結果
| 問題 |
No.72 そろばん Med
|
| コンテスト | |
| ユーザー |
kpinkcat
|
| 提出日時 | 2023-10-14 20:53:25 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 418 bytes |
| コンパイル時間 | 896 ms |
| コンパイル使用メモリ | 102,388 KB |
| 最終ジャッジ日時 | 2025-02-17 07:49:39 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 WA * 1 |
ソースコード
#include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<vector>
#include<set>
#include<list>
#include<queue>
#include<math.h>
#include<bitset>
using ll = long long;
using namespace std;
int main(){
ll n, n1, n2, ans, mod = 1e6+7;
cin >> n;
(!(n % 2)) ? (n1 = n/2) : (n1 = n/2 + 1);
n1 %= mod;
n2 = n - n1;
n2 %= mod;
cout << (n2 + 1)*(n1 + 1)%mod -1 << endl;
}
kpinkcat