結果
問題 | No.71 そろばん |
ユーザー |
![]() |
提出日時 | 2017-02-18 13:16:45 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 262 bytes |
コンパイル時間 | 620 ms |
コンパイル使用メモリ | 54,112 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-30 03:58:35 |
合計ジャッジ時間 | 1,588 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <iostream> #include <cstdio> using namespace std; #define rep(i,n) for(int i=0;i<(n);i++) int main(){ long long n=0; cin>>n; long long u=0; long long ans=0; for (int i = 0; i <= n; ++i) { ans=max(ans,i*(n-i+1)+n-i); } cout<<ans<<endl; return 0; }