結果

問題 No.71 そろばん
ユーザー lloyz
提出日時 2023-03-23 00:22:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 46 ms / 5,000 ms
コード長 144 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 82,208 KB
実行使用メモリ 60,496 KB
最終ジャッジ日時 2024-09-18 15:07:54
合計ジャッジ時間 1,873 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

if n == 1:
    print(1)
    exit()
ans = 0
for i in range(1, n):
    j = n - i
    ans = max(ans, (i + 1) * j + i)
print(ans)
0