結果

問題 No.73 helloworld
ユーザー matsu7874matsu7874
提出日時 2014-11-21 01:11:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 17 ms / 5,000 ms
コード長 532 bytes
コンパイル時間 1,064 ms
コンパイル使用メモリ 10,708 KB
実行使用メモリ 8,024 KB
最終ジャッジ日時 2023-09-11 07:27:53
合計ジャッジ時間 1,209 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,880 KB
testcase_01 AC 17 ms
7,992 KB
testcase_02 AC 17 ms
7,884 KB
testcase_03 AC 16 ms
7,952 KB
testcase_04 AC 16 ms
7,888 KB
testcase_05 AC 16 ms
7,956 KB
testcase_06 AC 17 ms
7,956 KB
testcase_07 AC 16 ms
7,884 KB
testcase_08 AC 16 ms
7,964 KB
testcase_09 AC 17 ms
8,024 KB
testcase_10 AC 16 ms
7,888 KB
testcase_11 AC 17 ms
7,904 KB
testcase_12 AC 16 ms
7,956 KB
testcase_13 AC 17 ms
7,924 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

def nCr(n,r):
	ncr = 1
	for i in range(1,r+1):
		ncr = int(ncr * (n-i+1)/i)
	return ncr

c = []
for i in range(ord('a'), ord('z')+1):
	c.append(int(input()))

y = int(c[ord('o')-ord('a')]//2)

max_hellowolrd = 0
for x in range(1,c[ord('l')-ord('a')]-1):
	max_hellowolrd = max(max_hellowolrd, c[ord('h')-ord('a')] * c[ord('e')-ord('a')] * nCr(c[ord('l')-ord('a')]-x, 2) * (c[ord('o')-ord('a')]-y) * c[ord('w')-ord('a')] * y * c[ord('r')-ord('a')] * x * c[ord('d')-ord('a')])
print(int(max_hellowolrd))
0