結果
問題 | No.72 そろばん Med |
ユーザー |
![]() |
提出日時 | 2014-11-18 23:51:43 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 475 bytes |
コンパイル時間 | 678 ms |
コンパイル使用メモリ | 70,792 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-21 11:31:54 |
合計ジャッジ時間 | 1,541 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include <iostream> #include <string> #include <vector> #include <cmath> #include <algorithm> #include <cstdlib> #include <ctime> #include <cstdio> #include <functional> #include <set> using namespace std; const long long mod=1000007; int main() { long long n; cin>>n; //(x+1)(n-x+1)の最大化 long long x=n/2; long long res=(((x+1)%mod)*((n-x+1)%mod))%mod; if(res==0) res=mod-1; else res--; cout<<res<<endl; return 0; }