結果

問題 No.816 Beautiful tuples
ユーザー 双六
提出日時 2019-04-19 21:53:47
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 219 bytes
コンパイル時間 147 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-09-22 18:47:54
合計ジャッジ時間 1,205 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other RE * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

def getlist():
	return list(map(int, input().split()))

A, B = getlist()
A, B = sorted(A, B)
if B % A != 0:
	print(-1)
else:
	if int(B // A) == 2:
		print(A * 3)
	elif int(B // A) == 3:
		print(A * 2)
	else:
		print(-1)
0