結果
| 問題 | No.72 そろばん Med | 
| コンテスト | |
| ユーザー |  otsnsk | 
| 提出日時 | 2014-12-27 19:22:40 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 506 bytes | 
| コンパイル時間 | 433 ms | 
| コンパイル使用メモリ | 54,124 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-11-21 11:38:20 | 
| 合計ジャッジ時間 | 1,429 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 24 | 
ソースコード
#include <iostream>
#define FORR(i,b,e) for(int i=(b);i<(int)(e);++i)
#define FOR(i,e) FORR(i,0,e)
#define dump(var) cerr << #var ": " << var << "\n"
#define dumpc(con) for(auto& e: con) cerr << e << " "; cerr<<"\n"
typedef long long ll;
typedef unsigned long long ull;
const ull MODD = 1000007;
using namespace std;
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    ull N;
    cin >> N;
    ull p = N/2, q = N-N/2;
    cout << ((p%MODD)*(q%MODD) + N)%MODD << endl;
    return 0;
}
            
            
            
        