結果
問題 | No.1680 Sum and Difference |
ユーザー |
![]() |
提出日時 | 2021-08-02 19:07:19 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 282 bytes |
コンパイル時間 | 751 ms |
コンパイル使用メモリ | 68,760 KB |
最終ジャッジ日時 | 2025-01-23 13:43:39 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
#include <iostream> #include <atcoder/modint> using namespace std; using mint = atcoder::modint1000000007; int main() { long long A, B; cin >> A >> B; cout << (mint(A / 2 * 2 + 1) * mint(B / 2 * 2 + 1) + mint((A + 1) / 2 * 2) * mint((B + 1) / 2 * 2)).val() << '\n'; }