zoj 1120 Chairlift

zoj 1120 Chairlift,第1张

zoj 1120 Chairlift
#include <stdio.h>int main(){int N, a, b;double t;printf("Program 1 by team Xn");scanf("%d%lf", &N, &t);printf("N =%4d, T = %.1lfn", N, t);while(scanf("%d%d", &a, &b)!=EOF){int c = a - b;if(c < 0) c += N;printf("Chair%4d meets chair%4d, remaining time = ", a, b);printf("%5.1lfn", t*(c-0.5)/(N-1));}printf("End of program 1 by team Xn");return 0;}

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/4934111.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-11-13
下一篇 2022-11-13

发表评论

登录后才能评论

评论列表(0条)

保存