結果

問題 No.816 Beautiful tuples
ユーザー kohei2019kohei2019
提出日時 2022-04-18 22:29:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 68 ms / 1,500 ms
コード長 208 bytes
コンパイル時間 495 ms
コンパイル使用メモリ 86,672 KB
実行使用メモリ 71,236 KB
最終ジャッジ日時 2023-08-28 19:12:54
合計ジャッジ時間 2,224 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,000 KB
testcase_01 AC 68 ms
71,020 KB
testcase_02 AC 66 ms
70,772 KB
testcase_03 AC 66 ms
71,236 KB
testcase_04 AC 68 ms
71,208 KB
testcase_05 AC 68 ms
70,932 KB
testcase_06 AC 67 ms
70,724 KB
testcase_07 AC 68 ms
71,116 KB
testcase_08 AC 68 ms
71,016 KB
testcase_09 AC 67 ms
71,004 KB
testcase_10 AC 68 ms
70,728 KB
testcase_11 AC 68 ms
71,016 KB
testcase_12 AC 67 ms
71,020 KB
testcase_13 AC 66 ms
71,080 KB
testcase_14 AC 65 ms
71,060 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A,B = map(int,input().split())
if A > B:
    A,B = B,A

if B//A == 3 and B%A==0:
    print(A*2)
elif B//A ==2 and B%A==0:
    print(A*3)
elif (2*B)//A == 3 and (2*B)%A ==0:
    print(B//3)
else:
    print(-1)
0