QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#32106 | #1462. Euclid's Algorithm | Wu_Ren | AC ✓ | 22ms | 8584kb | Python3 | 150b | 2022-05-17 09:37:11 | 2022-05-17 20:01:22 |
Judging History
answer
def gcd(x,y):
c=x if y==0 else gcd(y,x%y)
return c
d,k=map(int,input().split(' '))
if d%4==2 and k%2==0 and k>3:
d=d*2
print(d*gcd(d**333,k))
详细
Test #1:
score: 100
Accepted
time: 17ms
memory: 8340kb
input:
2 2
output:
4
result:
ok answer is '4'
Test #2:
score: 0
Accepted
time: 18ms
memory: 8516kb
input:
2 4
output:
16
result:
ok answer is '16'
Test #3:
score: 0
Accepted
time: 18ms
memory: 8320kb
input:
2 6
output:
8
result:
ok answer is '8'
Test #4:
score: 0
Accepted
time: 9ms
memory: 8376kb
input:
4 2
output:
8
result:
ok answer is '8'
Test #5:
score: 0
Accepted
time: 6ms
memory: 8484kb
input:
4 4
output:
16
result:
ok answer is '16'
Test #6:
score: 0
Accepted
time: 18ms
memory: 8396kb
input:
4 6
output:
8
result:
ok answer is '8'
Test #7:
score: 0
Accepted
time: 14ms
memory: 8524kb
input:
6 2
output:
12
result:
ok answer is '12'
Test #8:
score: 0
Accepted
time: 7ms
memory: 8400kb
input:
6 6
output:
72
result:
ok answer is '72'
Test #9:
score: 0
Accepted
time: 13ms
memory: 8336kb
input:
36 648
output:
23328
result:
ok answer is '23328'
Test #10:
score: 0
Accepted
time: 14ms
memory: 8516kb
input:
60 99
output:
540
result:
ok answer is '540'
Test #11:
score: 0
Accepted
time: 8ms
memory: 8416kb
input:
84623 25861
output:
930853
result:
ok answer is '930853'
Test #12:
score: 0
Accepted
time: 22ms
memory: 8536kb
input:
219180268605669 553965740275253
output:
219180268605669
result:
ok answer is '219180268605669'
Test #13:
score: 0
Accepted
time: 5ms
memory: 8532kb
input:
19728438407335121904996019735322477137294389262704 40235056938388958311356557231206660476362746857359
output:
19728438407335121904996019735322477137294389262704
result:
ok answer is '19728438407335121904996019735322477137294389262704'
Test #14:
score: 0
Accepted
time: 19ms
memory: 8584kb
input:
1074573287688919347398266782908645101135909901335156757399944107940103198051204517747671103326216971 867073107604167614631335512859499109491425856674914772927706844895666498977878232856089985562395630
output:
1074573287688919347398266782908645101135909901335156757399944107940103198051204517747671103326216971
result:
ok answer is '107457328768891934739826678290...3198051204517747671103326216971'
Test #15:
score: 0
Accepted
time: 20ms
memory: 8316kb
input:
1545364800 1866240000
output:
2884021604352000000
result:
ok answer is '2884021604352000000'
Test #16:
score: 0
Accepted
time: 11ms
memory: 8360kb
input:
196577838133268 62036664617471
output:
6506415652649082103292
result:
ok answer is '6506415652649082103292'
Test #17:
score: 0
Accepted
time: 8ms
memory: 8400kb
input:
7638267112932583872 8937276186820608
output:
6205936616089761596516604907094016
result:
ok answer is '6205936616089761596516604907094016'
Test #18:
score: 0
Accepted
time: 13ms
memory: 8412kb
input:
56960489971825979504539258926 9457261942796222464
output:
3732962670793587392809484872974336
result:
ok answer is '3732962670793587392809484872974336'
Test #19:
score: 0
Accepted
time: 12ms
memory: 8352kb
input:
3492920028584059607346104176645377950340 2210513765326283273721047833975957447760
output:
7721147804368938603391281346772356751955304866626577222596537876234406424238400
result:
ok answer is '772114780436893860339128134677...6577222596537876234406424238400'
Test #20:
score: 0
Accepted
time: 19ms
memory: 8356kb
input:
33580469875914899191784324176735310219778425678808 352036658721018805871426248948398295288719201280
output:
43509886802701604343903778086057871138902058467198016181607728897581056
result:
ok answer is '435098868027016043439037780860...2058467198016181607728897581056'
Test #21:
score: 0
Accepted
time: 17ms
memory: 8432kb
input:
233120676700893541227827896006724777312456429196371552045830 11993052708358232065902293254337756823160877907852808073000
output:
103627193127021047454206263009254511311994431874586548035250195600732224064667143934860000
result:
ok answer is '103627193127021047454206263009...0195600732224064667143934860000'
Test #22:
score: 0
Accepted
time: 9ms
memory: 8364kb
input:
374287523661717862257123693024594738173223473867797110380262009400384731600 73313981998677068372306147525761586766817824528084327759440080111644456000
output:
343748366795043379031491110438199042012103255140600517331230838878833529970717972402310941222928159737727324800000
result:
ok answer is '343748366795043379031491110438...2310941222928159737727324800000'
Test #23:
score: 0
Accepted
time: 17ms
memory: 8428kb
input:
102308215069415477544990434755246314966094551801258636989235723513756338829076493405962456 174394535962022688367374281009041610712065897194254368585616364264632933530390757376
output:
17841993692133529031408139697669266093172756902948475905017264170726091268200916498690443997107325176583836821507750897537379201834819413814372040879746767390144872061075456
result:
ok answer is '178419936921335290314081396976...2040879746767390144872061075456'
Test #24:
score: 0
Accepted
time: 22ms
memory: 8436kb
input:
622006004209738788427965498224978929877976057833508006154121439429484760625751254808704252651934800 6276616594996606898070939459641259677204329155084132869507149857390982875034274408970000000000
output:
931370379123672920811644835008029120343724411385687334762741686897765925677312717493958557390587367476282025971731150577300272511117660160796237299752663119092482128140197572000000000000
result:
ok answer is '931370379123672920811644835008...9092482128140197572000000000000'