結果

問題 No.982 Add
ユーザー kohei2019
提出日時 2021-02-04 12:59:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 42 ms / 2,000 ms
コード長 117 bytes
コンパイル時間 178 ms
コンパイル使用メモリ 82,224 KB
実行使用メモリ 53,688 KB
最終ジャッジ日時 2024-06-30 17:38:53
合計ジャッジ時間 2,154 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
A,B = map(int,input().split())
l = math.gcd(A,B)
if l == 1:
    print((A-1)*(B-1)//2)
else:
    print(-1)
0