标签:
Time Limit: 600/200 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)
Total Submission(s): 1458 Accepted Submission(s): 734
#include<stdio.h> #include<string.h> #include <iostream> #include <algorithm> using namespace std; int main() { int tcase; scanf("%d",&tcase); while(tcase--){ int t,m,a,b; double ans; scanf("%d%d",&t,&m); while(m--){ scanf("%d%d",&a,&b); if(a==1){ ans = b*(60-t)*1.0; } if(a==2){ ans = 60.0*b*60/(60-t); } if(a==3){ ans = b*3600*12*60.0/t; } printf("%.2lf\n",ans); } } return 0; }
标签:
原文地址:http://www.cnblogs.com/liyinggang/p/5620515.html