#include <stdio.h> #include <string.h> #define MAXN 100010 #define MAXE 400010 const int INF = 0x3f3f3f3f; int main() { int T; for(scanf("%d", &T); T--;) { double x, t; scanf("%lf", &x); int Q; scanf("%d", &Q); int mark; while(Q--) { scanf("%d%lf", &mark, &t); if(mark == 1) printf("%0.2lf\n", t * 60 * (60 - x) / 60); else if(mark == 2) printf("%0.2lf\n", t * 60 * 60 / (60 - x)); else printf("%0.2lf\n", 12 * 60 * 60 * 60 * t / x); } } return 0; }
hdu 4530 小Q系列故事——大笨钟
最新推荐文章于 2017-08-05 22:35:09 发布