結果

問題 No.1680 Sum and Difference
ユーザー timitimi
提出日時 2021-09-22 10:19:05
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 133 bytes
コンパイル時間 434 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-04 22:13:49
合計ジャッジ時間 1,801 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

A,B=map(int, input().split())
mod=10**9+7
A%=mod
B%=mod
ans=2*A*B+A+B
ans%=mod
if (A-B)%2==0:
  print((ans+1)%mod)
else:
  print(ans)
0