結果

問題 No.73 helloworld
ユーザー rpy3cpprpy3cpp
提出日時 2015-07-21 22:25:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 16 ms / 5,000 ms
コード長 543 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 10,952 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2023-09-11 11:54:14
合計ジャッジ時間 1,265 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,816 KB
testcase_01 AC 16 ms
7,812 KB
testcase_02 AC 16 ms
7,848 KB
testcase_03 AC 16 ms
7,972 KB
testcase_04 AC 16 ms
7,788 KB
testcase_05 AC 16 ms
7,816 KB
testcase_06 AC 16 ms
7,808 KB
testcase_07 AC 16 ms
7,804 KB
testcase_08 AC 16 ms
7,788 KB
testcase_09 AC 16 ms
7,764 KB
testcase_10 AC 16 ms
7,852 KB
testcase_11 AC 16 ms
7,848 KB
testcase_12 AC 15 ms
7,764 KB
testcase_13 AC 16 ms
7,732 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

start = ord('a')
end = ord('z')
counts = dict()
for c in range(start, end + 1):
    n = int(input())
    counts[chr(c)] = n
h = counts['h']
e = counts['e']
l = counts['l']
o = counts['o']
w = counts['w']
r = counts['r']
d = counts['d']
if h < 1 or e < 1 or l < 3 or o < 2 or w < 1 or r < 1 or d < 1:
    print(0)
else:
    max_pattern = 0
    for i in range(2, l):
        pattern = i * (i - 1) * (l - i) // 2
        if pattern > max_pattern:
            max_pattern = pattern
    print(max_pattern * (o//2) * (o - o//2) * h * e * w * r * d)
0