結果
問題 |
No.816 Beautiful tuples
|
ユーザー |
|
提出日時 | 2019-07-11 10:31:37 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 250 bytes |
コンパイル時間 | 464 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 16,000 KB |
最終ジャッジ日時 | 2024-11-07 08:51:55 |
合計ジャッジ時間 | 3,187 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 TLE * 1 -- * 12 |
ソースコード
a, b = map(int, input().split()) s = set() for i in range(1, a + b + 1): if (a + b) % i == 0: s.add(i) l = list(s - {a} - {b}) for i in l: if (a + i) % b == 0 and (b + i) % a == 0: print(i) break else: print(-1)