题目链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1111
这是道简单的数学题。
<span style="font-size:18px;">#include<stdio.h> int main() { int t,z,d;; float x,y,k,s; scanf("%d",&t); int i; while (t--) { scanf("%f%f%d",&x,&y,&z); k=(x+y)/3; if (x-k>k) s=z; else s=(x/k-1)*z; printf("%0.0f\n",s); } return 0; } </span>
时间: 2024-12-24 19:36:55