結果
| 問題 |
No.1680 Sum and Difference
|
| コンテスト | |
| ユーザー |
moondrink
|
| 提出日時 | 2021-09-22 20:28:57 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 333 bytes |
| コンパイル時間 | 1,654 ms |
| コンパイル使用メモリ | 165,056 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-05 09:19:52 |
| 合計ジャッジ時間 | 2,201 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 4 WA * 14 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mod = 1e9 + 7;
ll a,b;
int main()
{
scanf("%lld %lld",&a,&b);
ll ans = 0;
ans += ((a + 1ll) % mod * (b + 1ll) % mod) % mod + (a % mod * b % mod) % mod;
ans %= mod;
if(a - b & 1) ans -= 1ll;
printf("%lld\n",ans);
return 0;
}
moondrink