結果

問題 No.1680 Sum and Difference
ユーザー syunsuke1024syunsuke1024
提出日時 2021-09-19 15:31:18
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 154 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 87,100 KB
実行使用メモリ 71,560 KB
最終ジャッジ日時 2023-09-14 11:18:29
合計ジャッジ時間 3,268 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,256 KB
testcase_01 AC 71 ms
71,320 KB
testcase_02 AC 72 ms
71,396 KB
testcase_03 AC 70 ms
71,544 KB
testcase_04 WA -
testcase_05 AC 71 ms
71,560 KB
testcase_06 AC 69 ms
71,532 KB
testcase_07 AC 72 ms
71,220 KB
testcase_08 WA -
testcase_09 AC 69 ms
71,184 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 71 ms
71,356 KB
testcase_13 AC 71 ms
71,328 KB
testcase_14 AC 69 ms
71,212 KB
testcase_15 WA -
testcase_16 AC 68 ms
71,380 KB
testcase_17 AC 68 ms
71,476 KB
testcase_18 AC 68 ms
71,288 KB
testcase_19 AC 69 ms
71,284 KB
testcase_20 AC 71 ms
71,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A,B = map(int,input().split())

mod = 10**9 + 7
ans = 0
ans += (1+(A//2)*2)*(1+(min(A,B)//2)*2)
ans += (((A+1)//2)*2)*((min(A+1,B+1)//2)*2)
print(ans%mod)
0