結果
| 問題 | No.816 Beautiful tuples |
| コンテスト | |
| ユーザー |
Konton7
|
| 提出日時 | 2019-05-24 11:36:07 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 237 bytes |
| 記録 | |
| コンパイル時間 | 337 ms |
| コンパイル使用メモリ | 20,576 KB |
| 実行使用メモリ | 20,572 KB |
| 最終ジャッジ日時 | 2026-04-06 05:50:58 |
| 合計ジャッジ時間 | 4,474 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 15 |
ソースコード
a, b = [ int(v) for v in input().split() ] x = a + b xsqrt = math.ceil((x*1.0)**0.5) ans = -1 for i in range(1,xsqrt+1): if x % i == 0: if a != i and b != i and (a + i) % b == 0 and (b + i) % a == 0: ans = i break print(ans)
Konton7