BNU OJ 50997 BQG's Programming Contest
#include<cstdio> #include<cstring> #include<cmath> #include<algorithm> using namespace std; int ans; int T; int a,b; int main() { scanf("%d",&T); while(T--) { scanf("%d%d",&a,&b); ans=max(a,b)*5; if(ans<1000) ans=1000; if(ans>60000) ans=60000; printf("%d\n",ans); } return 0; }