結果
問題 |
No.816 Beautiful tuples
|
ユーザー |
![]() |
提出日時 | 2019-04-19 22:16:39 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 242 bytes |
コンパイル時間 | 171 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 17,824 KB |
最終ジャッジ日時 | 2024-09-22 20:51:15 |
合計ジャッジ時間 | 3,430 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 TLE * 1 -- * 7 |
ソースコード
import math a,b=map(int,input().split()) c=math.gcd(a,b) d=c i=1 while c<=a+b: if (a+b)%c==0 and (a+c)%b==0 and (b+c)%a==0 and a!=b and b!=c and c!=a: print(c) break else: i+=1 c=d*i else: print(-1)