A. BQG's Programming Contest

A. BQG's Programming Contest

Time Limit: 2000ms
Memory Limit: 32768KB
64-bit integer IO format:  %lld      Java class name:  Main
又到了一年一度的北京师范大学新生程序设计竞赛! Big \ Q \ God为作为良心出题人,决定开大时限送温暖!
 
BQG写了两份代码,决定采用耗时更多的一份作为标程,题目的时间限制将会是标程的五倍,并且不少于 1000ms,但是评测机资源有限,也不能多于 60000ms
 
然而粗心的 BQG算好时限之后忘记写进题目了,现在给出两份代码的运行时间(单位: ms),你需要帮他算出这个题的时间限制。

Input

第一行是一个正整数 T(T \leq 100000), 表示测试数据的组数,
 
每组测试数据只有一行,
 
包含两个整数 t_1,t_2(0 \leq t_1,t_2 \leq 60000),表示两份代码的运行时间。

Output

对于每组测试数据,输出一个整数,表示这个题的时间限制。

Sample Input

5
0 16
200 212
1000 1024
5000 10000
12000 20000

Sample Output

1000
1060
5120
50000
60000


题解网址:

https://blog.csdn.net/quailty/article/details/50410426

#include<stdio.h>
#include<string.h>
#include<iostream>
#include<stdlib.h>
#include<algorithm>
using namespace std;
int main(){
	int T;
	int t1,t2;
	cin>>T;
	while(T--){
		int max;
		cin>>t1>>t2;
		 max=t1>t2?t1:t2;
		 max=max*5;
		 if(max<1000){
		 	max=1000;
		 }
		 if(max>60000){
		 	max=60000;
		 }
		 cout<<max<<endl;
	}
	return 0;
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值