結果
| 問題 | No.72 そろばん Med |
| コンテスト | |
| ユーザー |
沙耶花
|
| 提出日時 | 2021-10-21 23:28:08 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 396 bytes |
| 記録 | |
| コンパイル時間 | 3,032 ms |
| コンパイル使用メモリ | 273,592 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-06-23 10:17:36 |
| 合計ジャッジ時間 | 4,078 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
#include <stdio.h>
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using mint = modint;
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf 1000000
int main(){
mint::set_mod(1000007);
long long n;
cin>>n;
long long x = n/2;
mint ans = n;
ans += mint(n) * mint(x);
ans -= mint(x).pow(2);
cout<<ans.val()<<endl;
return 0;
}
沙耶花