結果

問題 No.73 helloworld
ユーザー yaoshimaxyaoshimax
提出日時 2015-02-28 02:38:16
言語 Python2
(2.7.18)
結果
AC  
実行時間 14 ms / 5,000 ms
コード長 523 bytes
コンパイル時間 184 ms
コンパイル使用メモリ 6,700 KB
実行使用メモリ 6,328 KB
最終ジャッジ日時 2023-09-11 07:54:46
合計ジャッジ時間 1,319 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
6,172 KB
testcase_01 AC 14 ms
6,248 KB
testcase_02 AC 14 ms
6,188 KB
testcase_03 AC 14 ms
6,148 KB
testcase_04 AC 14 ms
6,328 KB
testcase_05 AC 14 ms
6,172 KB
testcase_06 AC 14 ms
6,180 KB
testcase_07 AC 14 ms
6,220 KB
testcase_08 AC 14 ms
6,168 KB
testcase_09 AC 14 ms
6,076 KB
testcase_10 AC 14 ms
6,184 KB
testcase_11 AC 14 ms
6,104 KB
testcase_12 AC 14 ms
6,072 KB
testcase_13 AC 14 ms
6,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def n(a):
    return ord(a)-ord('a')

def trip(n):
    if n <= 2:
        return 0
    ret = 0
    for i in range(2,n):
        ret = max(ret, (n-i)*i*(i-1)/2)
    return ret

ans=1
comb = [[0 for i in range(101)] for j in range (101)]
for i in range(101):
    comb[i][0]=1
    for j in range(1,i+1):
        comb[i][j] = comb[i-1][j-1]+comb[i-1][j]

cnt = [int(raw_input()) for i in range(26)]
print cnt[n('h')]*cnt[n('e')]*(cnt[n('o')]/2)*cnt[n('w')]*(cnt[n('o')]-cnt[n('o')]/2)*cnt[n('r')]*cnt[n('d')]*trip(cnt[n('l')])
0