結果

問題 No.1680 Sum and Difference
ユーザー sigmani
提出日時 2022-02-08 17:30:02
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 468 bytes
コンパイル時間 744 ms
コンパイル使用メモリ 92,088 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-23 12:57:45
合計ジャッジ時間 1,514 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include<string>
#include<math.h>
#include<bitset>
#include <vector>
#include<bitset>
#include <iomanip>
#include <map>
#include <set>
#include <stack>
#include <deque>
#include <climits>
#include <queue>
using namespace std;

int main() {
	
	long long A, B;
	cin >> A >> B;
	A=A%1000000007;
	B=B%1000000007;
	if (A % 2 == B % 2)cout << (2 * A * B + A + B + 1) % 1000000007;
	else cout << (2 * A * B + A + B ) % 1000000007;


	
}
0