結果

問題 No.1680 Sum and Difference
ユーザー NatsubiSoganNatsubiSogan
提出日時 2021-09-17 21:40:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 160 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 10,620 KB
実行使用メモリ 8,156 KB
最終ジャッジ日時 2023-09-12 07:06:41
合計ジャッジ時間 1,488 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,816 KB
testcase_01 AC 15 ms
8,104 KB
testcase_02 AC 15 ms
7,816 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 14 ms
7,992 KB
testcase_07 AC 15 ms
7,804 KB
testcase_08 WA -
testcase_09 AC 15 ms
7,772 KB
testcase_10 AC 15 ms
7,812 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 14 ms
7,848 KB
testcase_17 AC 14 ms
7,732 KB
testcase_18 WA -
testcase_19 AC 14 ms
7,732 KB
testcase_20 AC 14 ms
7,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a, b = map(int, input().split())
if a == 0: exit(print(b))
if b == 0: exit(print(a))
p = (a + b) * 2
s = a * b * 2
print((p + (s - p // 2 + 1)) % (10 ** 9 + 7))
0