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