結果

問題 No.816 Beautiful tuples
ユーザー howakuro
提出日時 2019-04-20 01:28:32
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 184 bytes
コンパイル時間 151 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 17,568 KB
最終ジャッジ日時 2024-09-24 17:58:08
合計ジャッジ時間 3,069 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2 TLE * 1 -- * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b = map(int,input().split())
for c in range(1,a+b+1):
    if a != c and c != b:
        if (a+b)%c==0 and (b+c)%a==0 and (c+a)%b==0:
            print(c)
            exit()
print(-1)
0