結果

問題 No.73 helloworld
ユーザー nbisconbisco
提出日時 2016-08-15 22:33:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 398 bytes
コンパイル時間 626 ms
コンパイル使用メモリ 10,908 KB
実行使用メモリ 7,968 KB
最終ジャッジ日時 2023-08-22 21:40:33
合計ジャッジ時間 1,695 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,780 KB
testcase_01 AC 15 ms
7,740 KB
testcase_02 AC 20 ms
7,764 KB
testcase_03 AC 16 ms
7,880 KB
testcase_04 AC 15 ms
7,968 KB
testcase_05 AC 16 ms
7,800 KB
testcase_06 AC 16 ms
7,740 KB
testcase_07 AC 16 ms
7,856 KB
testcase_08 AC 16 ms
7,876 KB
testcase_09 AC 16 ms
7,792 KB
testcase_10 AC 16 ms
7,800 KB
testcase_11 AC 16 ms
7,812 KB
testcase_12 RE -
testcase_13 AC 16 ms
7,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
C = {}
h = "helloworld"
for i in range(26):
    tmp = input()
    if chr(i+97) in set(h):
        C[chr(i+97)] = int(tmp)

total = C["h"]
for i in set(h)-set("h"):
    if i != "l" and i != "o":
        total *= C[i]
    elif i == "o":
        total *= C[i]//2
        total *= C[i]-C[i]//2
    else:
        total *= max([(j*(j-1)//2) * (C[i]-j) for j in range(C[i],0,-1)])
print(total)
0