結果
問題 |
No.71 そろばん
|
ユーザー |
![]() |
提出日時 | 2018-07-29 14:41:57 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 317 bytes |
コンパイル時間 | 831 ms |
コンパイル使用メモリ | 69,852 KB |
最終ジャッジ日時 | 2025-01-06 12:10:43 |
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <iostream> #include <algorithm> #include <utility> #include <numeric> int main() { long long int n = 0; std::cin >> n; long long int max = 0; for( int i = 1; i < n; ++i ) { max = std::max((n-i+1)*i + (n-i), max); } std::cout << max << std::endl; }