結果

問題 No.71 そろばん
ユーザー neko_the_shadowneko_the_shadow
提出日時 2019-02-28 15:07:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 592 ms / 5,000 ms
コード長 109 bytes
コンパイル時間 730 ms
コンパイル使用メモリ 10,576 KB
実行使用メモリ 7,952 KB
最終ジャッジ日時 2023-09-05 16:11:25
合計ジャッジ時間 9,717 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,792 KB
testcase_01 AC 15 ms
7,780 KB
testcase_02 AC 592 ms
7,920 KB
testcase_03 AC 228 ms
7,904 KB
testcase_04 AC 316 ms
7,892 KB
testcase_05 AC 487 ms
7,932 KB
testcase_06 AC 515 ms
7,780 KB
testcase_07 AC 357 ms
7,832 KB
testcase_08 AC 255 ms
7,888 KB
testcase_09 AC 545 ms
7,936 KB
testcase_10 AC 339 ms
7,792 KB
testcase_11 AC 85 ms
7,940 KB
testcase_12 AC 178 ms
7,780 KB
testcase_13 AC 552 ms
7,764 KB
testcase_14 AC 218 ms
7,844 KB
testcase_15 AC 445 ms
7,844 KB
testcase_16 AC 85 ms
7,788 KB
testcase_17 AC 270 ms
7,828 KB
testcase_18 AC 447 ms
7,952 KB
testcase_19 AC 508 ms
7,888 KB
testcase_20 AC 551 ms
7,888 KB
testcase_21 AC 252 ms
7,884 KB
testcase_22 AC 408 ms
7,768 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ans = 0
for x in range(n + 1):
    y = n - x
    ans = max(ans, x * (y + 1) + y)

print(ans)
0