結果

問題 No.1680 Sum and Difference
ユーザー hir355hir355
提出日時 2021-09-17 21:43:10
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 171 bytes
コンパイル時間 277 ms
コンパイル使用メモリ 86,788 KB
実行使用メモリ 71,380 KB
最終ジャッジ日時 2023-09-12 07:09:13
合計ジャッジ時間 2,902 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,296 KB
testcase_01 AC 78 ms
71,132 KB
testcase_02 AC 75 ms
71,340 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 75 ms
71,300 KB
testcase_06 AC 74 ms
71,288 KB
testcase_07 AC 75 ms
71,352 KB
testcase_08 WA -
testcase_09 AC 75 ms
71,188 KB
testcase_10 AC 75 ms
71,340 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 74 ms
71,272 KB
testcase_17 AC 75 ms
71,380 KB
testcase_18 WA -
testcase_19 AC 73 ms
71,072 KB
testcase_20 AC 74 ms
71,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 10 ** 9 + 7
a, b = map(int, input().split())
if a == 0:
    print(1)
elif b == 0:
    print((a + (a + 1) % 2) % MOD)
else:
    print((2 * a * b + (a + b) + 1) % MOD)
0