結果

問題 No.72 そろばん Med
ユーザー gorugo30gorugo30
提出日時 2021-02-26 16:52:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 38 ms / 5,000 ms
コード長 165 bytes
コンパイル時間 150 ms
コンパイル使用メモリ 82,484 KB
実行使用メモリ 53,588 KB
最終ジャッジ日時 2024-04-10 07:23:38
合計ジャッジ時間 2,090 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,004 KB
testcase_01 AC 35 ms
52,872 KB
testcase_02 AC 34 ms
53,004 KB
testcase_03 AC 34 ms
52,896 KB
testcase_04 AC 35 ms
52,212 KB
testcase_05 AC 34 ms
53,588 KB
testcase_06 AC 34 ms
53,352 KB
testcase_07 AC 35 ms
52,488 KB
testcase_08 AC 35 ms
52,196 KB
testcase_09 AC 35 ms
52,128 KB
testcase_10 AC 34 ms
52,964 KB
testcase_11 AC 33 ms
52,372 KB
testcase_12 AC 32 ms
52,628 KB
testcase_13 AC 38 ms
52,336 KB
testcase_14 AC 35 ms
51,624 KB
testcase_15 AC 35 ms
52,480 KB
testcase_16 AC 33 ms
52,620 KB
testcase_17 AC 34 ms
53,364 KB
testcase_18 AC 35 ms
52,456 KB
testcase_19 AC 33 ms
53,100 KB
testcase_20 AC 34 ms
53,496 KB
testcase_21 AC 34 ms
52,760 KB
testcase_22 AC 34 ms
51,800 KB
testcase_23 AC 34 ms
52,884 KB
testcase_24 AC 34 ms
53,192 KB
testcase_25 AC 33 ms
52,668 KB
testcase_26 AC 33 ms
52,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
MOD = 10 ** 6 + 7
ans = 0
ups = [N // 2, N // 2 - 1]
for up in ups:
    down = N - up
    ans = max(ans, (up + 1) * (down + 1) - 1)
print(ans % MOD)
0