結果
| 問題 | No.72 そろばん Med | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2015-02-15 21:09:31 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 300 bytes | 
| コンパイル時間 | 429 ms | 
| コンパイル使用メモリ | 60,380 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-11-21 11:39:31 | 
| 合計ジャッジ時間 | 1,308 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 24 | 
ソースコード
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <utility>
using namespace std;
const int MOD = 1000007;
int main() {
	long long n, x, ans;
	cin >> n;
	x = n / 2;
	ans = ((1LL + x) % MOD) * ((n - x) % MOD) + x;
	ans %= MOD;
	cout << ans << endl;
	return 0;
}
            
            
            
        