結果
| 問題 |
No.1680 Sum and Difference
|
| コンテスト | |
| ユーザー |
たまごん
|
| 提出日時 | 2021-09-17 22:02:03 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 349 bytes |
| コンパイル時間 | 1,616 ms |
| コンパイル使用メモリ | 165,580 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-29 20:31:10 |
| 合計ジャッジ時間 | 2,294 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 2 WA * 16 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1000000007;
const long long INF = 1LL << 60;
#define rep(i,n) for(int i = 0; i < n; i++)
#define all(x) (x).begin(),(x).end()
int main() {
ll a, b;
cin >> a >> b;
cout << (((a/2*2+1)%MOD*(b/2+1)%MOD)%MOD+((a+1)/2*2%MOD*((b+1)/2%MOD))%MOD)%MOD << endl;
}
たまごん