結果

問題 No.1680 Sum and Difference
ユーザー SidewaysOwlSidewaysOwl
提出日時 2021-09-17 22:45:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 1,000 ms
コード長 151 bytes
コンパイル時間 1,270 ms
コンパイル使用メモリ 86,668 KB
実行使用メモリ 71,536 KB
最終ジャッジ日時 2023-09-12 08:46:46
合計ジャッジ時間 3,063 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,224 KB
testcase_01 AC 74 ms
71,140 KB
testcase_02 AC 75 ms
71,204 KB
testcase_03 AC 75 ms
71,464 KB
testcase_04 AC 73 ms
71,536 KB
testcase_05 AC 74 ms
71,264 KB
testcase_06 AC 74 ms
71,304 KB
testcase_07 AC 74 ms
71,196 KB
testcase_08 AC 74 ms
71,288 KB
testcase_09 AC 73 ms
71,280 KB
testcase_10 AC 74 ms
71,176 KB
testcase_11 AC 74 ms
71,148 KB
testcase_12 AC 75 ms
71,272 KB
testcase_13 AC 73 ms
71,184 KB
testcase_14 AC 74 ms
71,248 KB
testcase_15 AC 74 ms
71,484 KB
testcase_16 AC 74 ms
71,336 KB
testcase_17 AC 75 ms
71,528 KB
testcase_18 AC 74 ms
71,220 KB
testcase_19 AC 73 ms
71,312 KB
testcase_20 AC 74 ms
71,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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