結果
| 問題 | No.1680 Sum and Difference |
| コンテスト | |
| ユーザー |
hitonanode
|
| 提出日時 | 2021-08-08 15:33:33 |
| 言語 | C++17(gcc12) (gcc 12.4.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 514 bytes |
| 記録 | |
| コンパイル時間 | 6,467 ms |
| コンパイル使用メモリ | 260,020 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-06-22 12:42:18 |
| 合計ジャッジ時間 | 7,505 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
// Validator
#include "testlib.h"
#include <iostream>
#include <atcoder/modint>
using namespace std;
using mint = atcoder::modint1000000007;
int main(int argc, char **argv) {
registerValidation(argc, argv);
long long A = inf.readLong(0LL, 1000000000000000000LL);
inf.readSpace();
long long B = inf.readLong(0LL, 1000000000000000000LL);
inf.readEoln();
inf.readEof();
cout << (mint(A / 2 * 2 + 1) * mint(B / 2 * 2 + 1) + mint((A + 1) / 2 * 2) * mint((B + 1) / 2 * 2)).val() << '\n';
}
hitonanode