結果

問題 No.72 そろばん Med
ユーザー aaaaaaiu
提出日時 2019-08-04 21:26:33
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 232 bytes
コンパイル時間 2,187 ms
コンパイル使用メモリ 192,620 KB
最終ジャッジ日時 2025-01-07 10:42:40
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
    int mod = 1e6+7;
    ll n;
    cin>>n;
    ll up=n/2%mod;
    ll down=(n-n/2)%mod;
    cout << (up*(down+1)%mod+down)%mod << endl;
    return 0;
}
0