2019-05-30
19:31:10
水题
#includeusing namespace std; int main() { int c; scanf("%d", &c); while(c--) { int n; int sum = 0; scanf("%d", &n); int a = n / 2; int b = (n - a) * 2 / 3; int c = n - a - b; if(a % 10 == 0) { sum += a/10; } else { sum += (a/10) + 1; } if(b % 10 == 0) { sum += b/10; } else { sum += (b/10) + 1; } if (c % 10 == 0) { sum += c / 10; } else { sum += (c / 10) + 1; } cout << sum <<endl; } return 0; }