QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#561994 | #8190. Jaw-Dropping Set | Afterlife# | WA | 0ms | 3700kb | C++20 | 337b | 2024-09-13 14:05:41 | 2024-09-13 14:05:43 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int n;
void Solve(){
cin>>n;
if(n%2==0)--n;
int m=n/3;
if(m%2==0)--m;
n=(n+1)/2;
m=(m+1)/2;
cout<<1LL*n*n+1LL*m*m<<'\n';
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int T;
cin>>T;
while(T--)Solve();
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3544kb
input:
7 1 2 3 4 5 6 7
output:
1 1 5 5 10 10 17
result:
ok 7 numbers
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3700kb
input:
12 8 9 10 11 12 13 14 15 16 17 18 19
output:
17 29 29 40 40 53 53 73 73 90 90 109
result:
wrong answer 2nd numbers differ - expected: '31', found: '29'