QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#54963 | #2965. RSA Mistake | abdelrahman001# | WA | 18ms | 3712kb | C++ | 956b | 2022-10-11 19:11:35 | 2022-10-11 19:11:38 |
Judging History
answer
#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
using namespace std;
const int N = 1e3 + 5;
vector<ll> get(ll x) {
vector<ll> ret;
for(int i = 2;1ll * i * i <= x;i++) {
while(x % i == 0) {
ret.push_back(i);
x /= i;
}
}
if(x > 1)
ret.push_back(x);
return ret;
}
int main() {
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
ll a, b;
cin >> a >> b;
auto va = get(a);
auto vb = get(b);
if(va.size() == 1 && vb.size() && a != b)
return cout << "full credit", 0;
set<ll> st;
for(auto i : va) {
if(st.count(i))
return cout << "no credit", 0;
st.insert(i);
}
for(auto i : vb) {
if(st.count(i))
return cout << "no credit", 0;
st.insert(i);
}
cout << "partial credit";
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 2ms
memory: 3708kb
input:
13 23
output:
full credit
result:
ok single line: 'full credit'
Test #2:
score: 0
Accepted
time: 2ms
memory: 3532kb
input:
35 6
output:
partial credit
result:
ok single line: 'partial credit'
Test #3:
score: 0
Accepted
time: 2ms
memory: 3620kb
input:
4 5
output:
no credit
result:
ok single line: 'no credit'
Test #4:
score: 0
Accepted
time: 2ms
memory: 3628kb
input:
17 17
output:
no credit
result:
ok single line: 'no credit'
Test #5:
score: 0
Accepted
time: 2ms
memory: 3628kb
input:
15 21
output:
no credit
result:
ok single line: 'no credit'
Test #6:
score: 0
Accepted
time: 13ms
memory: 3628kb
input:
545528636581 876571629707
output:
no credit
result:
ok single line: 'no credit'
Test #7:
score: 0
Accepted
time: 7ms
memory: 3632kb
input:
431348146441 3
output:
no credit
result:
ok single line: 'no credit'
Test #8:
score: 0
Accepted
time: 1ms
memory: 3560kb
input:
584803025179 200560490130
output:
partial credit
result:
ok single line: 'partial credit'
Test #9:
score: 0
Accepted
time: 3ms
memory: 3560kb
input:
725769156026 520807975733
output:
partial credit
result:
ok single line: 'partial credit'
Test #10:
score: 0
Accepted
time: 2ms
memory: 3552kb
input:
94785999423 831843785340
output:
no credit
result:
ok single line: 'no credit'
Test #11:
score: 0
Accepted
time: 2ms
memory: 3536kb
input:
962631984045 923583932904
output:
no credit
result:
ok single line: 'no credit'
Test #12:
score: 0
Accepted
time: 3ms
memory: 3712kb
input:
983892174682 596267564620
output:
no credit
result:
ok single line: 'no credit'
Test #13:
score: 0
Accepted
time: 15ms
memory: 3644kb
input:
988586693791 523281177667
output:
full credit
result:
ok single line: 'full credit'
Test #14:
score: 0
Accepted
time: 17ms
memory: 3616kb
input:
768483880537 958632922673
output:
full credit
result:
ok single line: 'full credit'
Test #15:
score: 0
Accepted
time: 17ms
memory: 3616kb
input:
695320496641 992131878511
output:
full credit
result:
ok single line: 'full credit'
Test #16:
score: 0
Accepted
time: 14ms
memory: 3536kb
input:
619864432127 575182057589
output:
full credit
result:
ok single line: 'full credit'
Test #17:
score: 0
Accepted
time: 14ms
memory: 3632kb
input:
574224928327 554785761851
output:
full credit
result:
ok single line: 'full credit'
Test #18:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
2 2
output:
no credit
result:
ok single line: 'no credit'
Test #19:
score: 0
Accepted
time: 18ms
memory: 3556kb
input:
999999999989 999999999961
output:
full credit
result:
ok single line: 'full credit'
Test #20:
score: 0
Accepted
time: 18ms
memory: 3544kb
input:
999999999989 999999999989
output:
no credit
result:
ok single line: 'no credit'
Test #21:
score: 0
Accepted
time: 10ms
memory: 3536kb
input:
2 999999999989
output:
full credit
result:
ok single line: 'full credit'
Test #22:
score: 0
Accepted
time: 10ms
memory: 3548kb
input:
999999999989 2
output:
full credit
result:
ok single line: 'full credit'
Test #23:
score: 0
Accepted
time: 16ms
memory: 3556kb
input:
799337241719 790574179457
output:
no credit
result:
ok single line: 'no credit'
Test #24:
score: 0
Accepted
time: 15ms
memory: 3632kb
input:
999962000357 999944000663
output:
no credit
result:
ok single line: 'no credit'
Test #25:
score: -100
Wrong Answer
time: 2ms
memory: 3548kb
input:
2 4
output:
full credit
result:
wrong answer 1st lines differ - expected: 'no credit', found: 'full credit'