結果
| 問題 | No.72 そろばん Med | 
| コンテスト | |
| ユーザー |  smiken_61 | 
| 提出日時 | 2015-10-11 21:23:44 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 288 bytes | 
| コンパイル時間 | 622 ms | 
| コンパイル使用メモリ | 63,912 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-21 11:49:33 | 
| 合計ジャッジ時間 | 1,466 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 24 | 
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <string>
using namespace std;
int main() {
	long long a,ans;
	cin >> a;
	ans = (((a - a / 2 + 1) % 1000007)*((a / 2 + 1) % 1000007) - 1) % 1000007;
	if (ans == -1) ans = 1000006;
	cout << ans << endl;
}
            
            
            
        