結果

問題 No.73 helloworld
ユーザー rlangevinrlangevin
提出日時 2023-01-16 20:35:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 5,000 ms
コード長 355 bytes
コンパイル時間 308 ms
コンパイル使用メモリ 87,104 KB
実行使用メモリ 71,412 KB
最終ジャッジ日時 2023-08-30 03:14:02
合計ジャッジ時間 2,454 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,292 KB
testcase_01 AC 76 ms
71,208 KB
testcase_02 AC 76 ms
71,276 KB
testcase_03 AC 74 ms
71,124 KB
testcase_04 AC 75 ms
71,172 KB
testcase_05 AC 75 ms
71,268 KB
testcase_06 AC 75 ms
71,368 KB
testcase_07 AC 76 ms
71,164 KB
testcase_08 AC 77 ms
71,268 KB
testcase_09 AC 75 ms
71,412 KB
testcase_10 AC 76 ms
71,192 KB
testcase_11 AC 74 ms
71,352 KB
testcase_12 AC 73 ms
71,164 KB
testcase_13 AC 74 ms
71,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

D = [0] * 26
for i in range(26):
    D[i] = int(input())
    
ans = 1
L = D[ord("l") - ord("a")]
O = D[ord("o") - ord("a")]
vL = -1
vO = -1
for i in range(L + 1):
    vL = max(vL, i * (i - 1)//2 * (L - i))
for i in range(O + 1):
    vO = max(vO, i * (O - i))
ans = vL * vO
for s in ["h", "e", "w", "r", "d"]:
    ans *= D[ord(s) - ord("a")]
print(ans)    
0