QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#582021 | #9381. 502 Bad Gateway | rotcar07 | WA | 484ms | 3676kb | C++20 | 222b | 2024-09-22 15:02:03 | 2024-09-22 15:02:04 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
int t;cin>>t;
while(t--){
ll n;cin>>n;
ll lf=n/2+1,w=lf*(lf+1)+(n-lf)*(n+3),r=n*2,g=gcd(w,r);
cout<<w/g<<' '<<r/g<<'\n';
}
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3676kb
input:
3 1 2 3
output:
1 1 3 2 2 1
result:
ok 3 lines
Test #2:
score: -100
Wrong Answer
time: 484ms
memory: 3676kb
input:
1000000 1 1000000000 1 1 1000000000 1 1000000000 1 1 1 1000000000 1 1 1000000000 1 1000000000 1000000000 1 1000000000 1 1 1000000000 1 1000000000 1000000000 1 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1 1 1000000000 1 1000000000 1000000000 1000000000 1000000000 1 1 1 10000000...
output:
1 1 750000001999999999 2000000000 1 1 1 1 750000001999999999 2000000000 1 1 750000001999999999 2000000000 1 1 1 1 1 1 750000001999999999 2000000000 1 1 1 1 750000001999999999 2000000000 1 1 750000001999999999 2000000000 750000001999999999 2000000000 1 1 750000001999999999 2000000000 1 1 1 1 75000000...
result:
wrong answer 2nd lines differ - expected: '1999961560 44721', found: '750000001999999999 2000000000'