結果

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

ソースコード

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;
	if (A % 2 == B % 2)cout << (2 * A * B + A + B + 1) % 1000000007;
	else cout << (2 * A * B + A + B ) % 1000000007;


	
}
0