Task: | trener |
Sender: | Kuha |
Submission time: | 2016-07-27 14:25:08 +0300 |
Language: | C++ |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | RUNTIME ERROR | 0 |
test | verdict | time | |
---|---|---|---|
#1 | RUNTIME ERROR | 0.12 s | details |
#2 | RUNTIME ERROR | 0.13 s | details |
#3 | RUNTIME ERROR | 0.12 s | details |
#4 | RUNTIME ERROR | 0.12 s | details |
#5 | RUNTIME ERROR | 0.14 s | details |
#6 | RUNTIME ERROR | 0.13 s | details |
#7 | RUNTIME ERROR | 0.01 s | details |
#8 | RUNTIME ERROR | 0.14 s | details |
#9 | RUNTIME ERROR | 0.15 s | details |
#10 | RUNTIME ERROR | 0.15 s | details |
#11 | RUNTIME ERROR | 0.14 s | details |
#12 | RUNTIME ERROR | 0.14 s | details |
#13 | RUNTIME ERROR | 0.14 s | details |
#14 | RUNTIME ERROR | 0.15 s | details |
#15 | RUNTIME ERROR | 0.14 s | details |
Code
#include <bits/stdc++.h> #define ll long long #define INF 999999999 #define N (1<<17) #define M 1000000007 using namespace std; int gcd(int a, int b) { if (!b) return a; return gcd(b, a % b); } int main () { int n, m; cin>>n>>m; if (n == m) cout<<0<<endl; else if (n < m) { int ans = n * (m % n); m -= m % n; if (n == m) cout<<ans<<endl; else { m /= n; ans += n * m - n; cout<<ans<<endl; } } else { n = n % m; int ans = n * (m % n); m -= m % n; if (n == m) cout<<ans<<endl; else { m /= n; ans += n * m - n; cout<<ans<<endl; } } }
Test details
Test 1
Verdict: RUNTIME ERROR
input |
---|
18
babic keksic boric bukic ... |
correct output |
---|
bk |
user output |
---|
(empty) |
Test 2
Verdict: RUNTIME ERROR
input |
---|
6
michael jordan lebron james ... |
correct output |
---|
PREDAJA |
user output |
---|
(empty) |
Test 3
Verdict: RUNTIME ERROR
input |
---|
10
wmyrsaney raqdxrb cnwkmtcokgskaxosctzyks wlusaisfibbkwwzdqhezuj ... |
correct output |
---|
w |
user output |
---|
(empty) |
Test 4
Verdict: RUNTIME ERROR
input |
---|
20
jgztazpytubijfsmjz bokvgratzzdibku qineboilzoqdqivc bfctyltibtkbxq ... |
correct output |
---|
b |
user output |
---|
(empty) |
Test 5
Verdict: RUNTIME ERROR
input |
---|
50
wkrtpgfjmzlnqigogi knqkkelytfjgmyxgyzcfd xdkjrptlcuzwqgvrtzdbybh vscbjbji ... |
correct output |
---|
efv |
user output |
---|
(empty) |
Test 6
Verdict: RUNTIME ERROR
input |
---|
100
cmksprocpmkl deyorcxeehlalonan tdoqxhvygiwbbklj rvamqpuprhynwduswppa ... |
correct output |
---|
dfqrt |
user output |
---|
(empty) |
Test 7
Verdict: RUNTIME ERROR
input |
---|
130
assootmfjtgcagtxh elqyysidg otuxclnjhvxdadm qmczmsgavvcboahqilzcuzm ... |
correct output |
---|
abcdefghijklmnopqrstuvwxyz |
user output |
---|
(empty) |
Test 8
Verdict: RUNTIME ERROR
input |
---|
60
ljuolrxkieqkobvikuyvt rhbrswllwycioayqjdertvb xmzcubmbbed uwgjslybqarciupgixt ... |
correct output |
---|
eflmnr |
user output |
---|
(empty) |
Test 9
Verdict: RUNTIME ERROR
input |
---|
5
pnmdjqteyiapkhvebbqtwnnh pirfyzgoqjsdsio pkcltfhwxemgyubef pxcjeh ... |
correct output |
---|
p |
user output |
---|
(empty) |
Test 10
Verdict: RUNTIME ERROR
input |
---|
20
fnuxegvwdqnkmkclmwlxeh kmurkl rlhxoacqadnzle foxonevsx ... |
correct output |
---|
PREDAJA |
user output |
---|
(empty) |
Test 11
Verdict: RUNTIME ERROR
input |
---|
81
pidkcuqljmxi mcpwm zyyjrvkkkwkabwppvpm aoighmgashjtvl ... |
correct output |
---|
cegiptuwx |
user output |
---|
(empty) |
Test 12
Verdict: RUNTIME ERROR
input |
---|
100
evyottlutpqus openmtwnmme yvtgrk shhpzhlgmpnnvswcpmjqiwe ... |
correct output |
---|
PREDAJA |
user output |
---|
(empty) |
Test 13
Verdict: RUNTIME ERROR
input |
---|
99
yuqgzaqmnwrghzntlv mcjkwfrkzchiauues uclswdwkhtvkcsvklyhyiw tggmfkr ... |
correct output |
---|
abeklmnqtvz |
user output |
---|
(empty) |
Test 14
Verdict: RUNTIME ERROR
input |
---|
4
kzyulnmhnmkowhtgrqksru xkgzlbwihowzdaodfg nvxkdrltxviwyhkf npvivwibxwrludfouga |
correct output |
---|
PREDAJA |
user output |
---|
(empty) |
Test 15
Verdict: RUNTIME ERROR
input |
---|
78
qdidvlkgpxjxmuqq kgbugcncxazixwtxtww abwtlqxkrusaocu esjmgrutkzebklqt ... |
correct output |
---|
ajlstxz |
user output |
---|
(empty) |