标签:我爱你 problem return 技术分享 bottom while 图片 cpp 指示
http://acm.hdu.edu.cn/showproblem.php?pid=2186

代码:
#include <bits/stdc++.h>
using namespace std;
int A(int x) {
if(x % 10 == 0)
return x / 10;
else
return (x / 10) + 1;
}
int main() {
int C;
scanf("%d", &C);
while(C --) {
int n, num = 0;
int team1 = 0, team2 = 0, team3 = 0;
scanf("%d", &n);
team1 = n / 2;
team2 = (n - team1) * 2 / 3;
team3 = n - team1 - team2;
num = A(team1) + A(team2) + A(team3);
printf("%d\n", num);
}
return 0;
}
HDU 2186 悼念512汶川大地震遇难同胞——一定要记住我爱你
标签:我爱你 problem return 技术分享 bottom while 图片 cpp 指示
原文地址:https://www.cnblogs.com/zlrrrr/p/9417349.html