#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;}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)