A. Dice Rolling

签到.

 1 #include <bits/stdc++.h>
 2 using namespace std;
 3 
 4 int t, n;
 5 
 6 int main()
 7 {
 8     scanf("%d", &t);
 9     while (t--)
10     {
11         scanf("%d", &n);
12         if (n <= 7) puts("1");
13         else
14         {
15             int res = 0;
16             res += n / 7;
17             printf("%d\n", res + 1);   
18         }
19     }
20     return 0;
21 }
View Code

相关文章: