結果

問題 No.72 そろばん Med
ユーザー krotonkroton
提出日時 2014-11-19 04:39:29
言語 C++11
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 371 bytes
コンパイル時間 699 ms
コンパイル使用メモリ 57,208 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2025-01-02 19:10:07
合計ジャッジ時間 1,648 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 3 WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
typedef long long ll;

const ll MOD = 1000007;

int main(){
    ll N;
    cin >> N;
    
    ll top = N / 2;
    ll bot = N - top;
    
    ll res = 1;
    res = (res * top % MOD) % MOD;
    res = (res * (bot + 1) % MOD) % MOD;
    res = (res + bot % MOD) % MOD;
    
    cout << res << endl;
    return 0;
}
0