結果

問題 No.72 そろばん Med
ユーザー itezpace
提出日時 2016-08-06 07:30:50
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 260 bytes
コンパイル時間 1,138 ms
コンパイル使用メモリ 54,616 KB
実行使用メモリ 9,888 KB
最終ジャッジ日時 2024-11-07 02:44:16
合計ジャッジ時間 13,799 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 3
other TLE * 1 -- * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
typedef long long ll;
const int mod=1e6+7;
int main(){
  ll n,x,y,z,p;
  cin>>n;
  y=0;
  for(int i=n/2; i<=n/2+1; ++i){
    x=(n-i)*(i+1)+i;
    if(x>=y){
      y=x;
    }
  }
  z=y%mod;
  cout<<z<<endl;
  return 0;
}
0