QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#707865 | #9167. Coprime Array | tamir | WA | 0ms | 3636kb | C++14 | 325b | 2024-11-03 17:54:04 | 2024-11-03 17:54:04 |
Judging History
answer
#include<bits/stdc++.h>
#define ll long long
#define ff first
#define ss second
using namespace std;
ll n,i,x,s,a[1000001];
int main(){
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
cin >> s >> x;
while(__gcd(s,x)>1){
n++;
a[n]=1;
s-=1;
}
for(i=1;i<=n;i++) cout << a[i] << " ";
cout << s;
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3636kb
input:
9 6
output:
1 1 7
result:
wrong answer Sum of the elements is not equal to s