結果

問題 No.1680 Sum and Difference
ユーザー t98slider
提出日時 2024-05-04 10:00:21
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 13 ms / 1,000 ms
コード長 263 bytes
コンパイル時間 3,984 ms
コンパイル使用メモリ 251,128 KB
最終ジャッジ日時 2025-02-21 10:51:01
ジャッジサーバーID
(参考情報)
judge2 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using mint = atcoder::modint1000000007;

int main(){
    long long a, b;
    cin >> a >> b;
    cout << (mint(a + (a & 1)) * (b + (b & 1)) + mint(a + (~a & 1)) * (b + (~b & 1))).val() << endl;
}
0