QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#829844 | #9768. A + B = C Problem | Kevin5307 | WA | 0ms | 3576kb | C++23 | 1.2kb | 2024-12-24 14:09:27 | 2024-12-24 14:09:28 |
Judging History
answer
//Author: Kevin
#include<bits/stdc++.h>
//#pragma GCC optimize("O2")
using namespace std;
#define ll long long
#define ull unsigned ll
#define pb emplace_back
#define mp make_pair
#define ALL(x) (x).begin(),(x).end()
#define rALL(x) (x).rbegin(),(x).rend()
#define srt(x) sort(ALL(x))
#define rev(x) reverse(ALL(x))
#define rsrt(x) sort(rALL(x))
#define sz(x) (int)(x.size())
#define inf 0x3f3f3f3f
#define pii pair<int,int>
#define lb(v,x) (int)(lower_bound(ALL(v),x)-v.begin())
#define ub(v,x) (int)(upper_bound(ALL(v),x)-v.begin())
#define uni(v) v.resize(unique(ALL(v))-v.begin())
#define longer __int128_t
void die(string S){puts(S.c_str());exit(0);}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int t;
cin>>t;
while(t--)
{
ll A,B,C;
cin>>A>>B>>C;
ll g=__gcd(A,B);
ll M=A*B/g;
if(M%C)
cout<<"No\n";
else
{
ll D=M/C;
if(A%D||B%D||D>1)
cout<<"No\n";
else
{
cout<<"Yes\n";
if(D==1)
{
for(int i=0;i<A;i++)
cout<<(i==0);
cout<<'\n';
for(int i=0;i<B;i++)
cout<<(i==0);
cout<<'\n';
}
}
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3576kb
input:
2 2 3 6 2 3 5
output:
Yes 10 100 No
result:
wrong answer Token "No" doesn't correspond to pattern "[01]{1,1000000}" (test case 1)