QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#833043 | #9670. GG and YY’s Stone Game | chimu | WA | 0ms | 3620kb | C++17 | 786b | 2024-12-26 12:22:06 | 2024-12-26 12:22:15 |
Judging History
answer
#include <iostream>
#include<bits/stdc++.h>
long long z = 1e9 + 7;
using namespace std;
long long quick_power(long long a,long long n,long long m)
{
long long ans = 1;
while(n)
{
if (n % 2) ans = ans * a % m;//奇数
a = a * a % m;//底数平方的最后3位数字
n /= 2;//指数减半
}
return ans;
}
int main() {
int t;
cin >> t;
while(t--)
{
cin.tie(0),cout.sync_with_stdio(0);
long long n;
cin >> n;
if(n < 3) cout << 0 << " " << n << endl;
else
{
if(n % 3 == 0) cout << 1 << " " << n / 3;
else
{
cout << 0 << " " << n / 3 + (n % 3) << endl;
}
}
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3620kb
input:
3 1 2 3
output:
0 1 0 2 1 1
result:
ok 3 lines
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3568kb
input:
10000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 10...
output:
0 1 0 2 1 10 2 0 3 1 20 3 0 4 1 30 4 0 5 1 40 5 0 6 1 50 6 0 7 1 60 7 0 8 1 70 8 0 9 1 80 9 0 10 1 90 10 0 11 1 100 11 0 12 1 110 12 0 13 1 120 13 0 14 1 130 14 0 15 1 140 15 0 16 1 150 16 0 17 1 160 17 0 18 1 170 18 0 19 1 180 19 0 20 1 190 20 0 21 1 200 21 0 22 1 210 22 0 23 1 220 23 0 24 1 230 24...
result:
wrong answer 3rd lines differ - expected: '1 1', found: '1 10 2'