結果

問題 No.816 Beautiful tuples
ユーザー syunsukesyunsuke
提出日時 2019-04-19 21:31:51
言語 Python3
(3.10.1 + numpy 1.22.3 + scipy 1.8.0)
結果
AC  
実行時間 15 ms / 1,500 ms
コード長 221 bytes
コンパイル時間 79 ms
使用メモリ 7,744 KB
最終ジャッジ日時 2022-11-22 06:15:53
合計ジャッジ時間 1,255 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 14 ms
7,536 KB
testcase_01 AC 15 ms
7,732 KB
testcase_02 AC 14 ms
7,680 KB
testcase_03 AC 14 ms
7,740 KB
testcase_04 AC 13 ms
7,680 KB
testcase_05 AC 14 ms
7,728 KB
testcase_06 AC 14 ms
7,632 KB
testcase_07 AC 13 ms
7,628 KB
testcase_08 AC 15 ms
7,572 KB
testcase_09 AC 14 ms
7,712 KB
testcase_10 AC 15 ms
7,628 KB
testcase_11 AC 14 ms
7,740 KB
testcase_12 AC 15 ms
7,744 KB
testcase_13 AC 14 ms
7,576 KB
testcase_14 AC 15 ms
7,680 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A,B=map(int,input().split())

if A==B:
    print(A)
elif max(A,B)==min(A,B)*2:
    print(min(A,B)*3)
elif max(A,B)==min(A,B)*3:
    print(min(A,B)*2)
elif max(A,B)==min(A,B)*1.5:
    print(min(A,B)//2)
else:
    print(-1)
0