QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#561994#8190. Jaw-Dropping SetAfterlife#WA 0ms3700kbC++20337b2024-09-13 14:05:412024-09-13 14:05:43

Judging History

你现在查看的是最新测评结果

  • [2024-09-13 14:05:43]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3700kb
  • [2024-09-13 14:05:41]
  • 提交

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'