結果
問題 | No.1680 Sum and Difference |
ユーザー |
|
提出日時 | 2021-09-20 01:37:05 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 363 bytes |
コンパイル時間 | 1,661 ms |
コンパイル使用メモリ | 166,984 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-02 06:21:58 |
合計ジャッジ時間 | 2,266 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
#include <bits/stdc++.h> //#include<atcoder/all> using namespace std; //using namespace atcoder; using ll = long long; #define all(A) A.begin(),A.end() using vll = vector<ll>; #define rep(i, n) for (long long i = 0; i < (long long)(n); i++) ll mod = 1e9+7; int main() { ll A,B; cin>>A>>B; cout<<(2*(A%mod)*(B%mod)+A+B+((A-B)%2==0))%mod<<endl; }