You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
459 B
C++
28 lines
459 B
C++
#include <cstdio>
|
|
using namespace std;
|
|
const int mod = 1e9 + 7;
|
|
int main()
|
|
{
|
|
int T, n;
|
|
scanf("%d", &T);
|
|
while (T--)
|
|
{
|
|
long long ans = 1;
|
|
int c2 = 0, c3 = 0;
|
|
scanf("%d", &n);
|
|
c3 = n / 3;
|
|
int rst = n % 3;
|
|
if (rst == 1) {
|
|
if (c3) c3--, c2 += 2;
|
|
}
|
|
if (rst == 2) {
|
|
c2++;
|
|
}
|
|
if (rst == 0) {
|
|
|
|
}
|
|
printf("%lld\n", ans);
|
|
}
|
|
return 0;
|
|
}
|