結果
問題 |
No.72 そろばん Med
|
ユーザー |
![]() |
提出日時 | 2014-11-18 23:45:48 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 474 bytes |
コンパイル時間 | 572 ms |
コンパイル使用メモリ | 73,172 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2025-01-02 19:00:04 |
合計ジャッジ時間 | 1,440 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 WA * 1 |
ソースコード
#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)-1; if(res==0) res=mod-1; else res%=mod; cout<<res<<endl; return 0; }