結果
問題 |
No.1680 Sum and Difference
|
ユーザー |
![]() |
提出日時 | 2021-09-17 22:48:11 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 356 bytes |
コンパイル時間 | 2,364 ms |
コンパイル使用メモリ | 191,056 KB |
最終ジャッジ日時 | 2025-01-24 15:14:59 |
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 4 WA * 14 |
ソースコード
#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include<bits/stdc++.h> using namespace std; const int MOD=1e9+7; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); ll a,b; cin>>a>>b; cout<<((a/2*2+1)*(b/2*2+1)%MOD+((a+1)/2*2)*((b+1)/2*2)%MOD)%MOD<<endl; return 0; }