結果
| 問題 | No.72 そろばん Med | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2017-02-20 21:29:02 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 488 bytes | 
| コンパイル時間 | 771 ms | 
| コンパイル使用メモリ | 82,440 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-11-21 12:02:13 | 
| 合計ジャッジ時間 | 1,821 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 24 | 
ソースコード
#include <iostream>
#include <sstream>
#include <vector>
#include <array>
#include <string>
#include <algorithm>
#include <map>
#include <cmath>
#include <random>
using namespace std;
#define REP(i,first,last) for (int i=first;i<last;++i)
#define MAX(x,y) (x > y ? x : y)
#define MIN(x,y) (x < y ? x : y)
long N;
int devider = 1000007;
int main(){
  cin >> N;
  long k = N/2;
  long max = ((k + 1) % devider) * ((N - k) % devider) + (k % devider);
  cout << max % devider << endl;
}
            
            
            
        