結果

問題 No.73 helloworld
ユーザー roarisroaris
提出日時 2019-12-22 19:44:59
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 74 ms / 5,000 ms
コード長 388 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 87,124 KB
実行使用メモリ 71,520 KB
最終ジャッジ日時 2023-10-12 17:15:15
合計ジャッジ時間 2,231 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,196 KB
testcase_01 AC 72 ms
71,372 KB
testcase_02 AC 73 ms
71,472 KB
testcase_03 AC 74 ms
71,132 KB
testcase_04 AC 74 ms
71,316 KB
testcase_05 AC 73 ms
71,476 KB
testcase_06 AC 73 ms
71,520 KB
testcase_07 AC 72 ms
71,372 KB
testcase_08 AC 72 ms
71,368 KB
testcase_09 AC 72 ms
71,268 KB
testcase_10 AC 72 ms
71,516 KB
testcase_11 AC 73 ms
71,444 KB
testcase_12 AC 74 ms
71,268 KB
testcase_13 AC 74 ms
71,272 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

C = [int(input()) for _ in range(26)]
alpha = 'abcdefghijklmnopqrstuvwxyz'
idx = {}
c = 0

for alpha_i in alpha:
    idx[alpha_i] = c
    c += 1

h = C[idx['h']]
e = C[idx['e']]
l = C[idx['l']]
o = C[idx['o']]
w = C[idx['w']]
r = C[idx['r']]
d = C[idx['d']]
ans = h*e*(o//2)*(o-o//2)*w*r*d
l_max = 0

for i in range(l+1):
    l_max = max(l_max, i*(i-1)//2*(l-i))

ans *= l_max

print(ans)
0