結果
問題 | No.73 helloworld |
ユーザー | はむ吉🐹 |
提出日時 | 2017-01-09 19:25:26 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 27 ms / 5,000 ms |
コード長 | 501 bytes |
コンパイル時間 | 865 ms |
コンパイル使用メモリ | 10,804 KB |
実行使用メモリ | 9,232 KB |
最終ジャッジ日時 | 2023-09-12 09:41:06 |
合計ジャッジ時間 | 1,667 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 27 ms
9,172 KB |
testcase_01 | AC | 26 ms
9,076 KB |
testcase_02 | AC | 26 ms
9,200 KB |
testcase_03 | AC | 26 ms
9,220 KB |
testcase_04 | AC | 27 ms
9,096 KB |
testcase_05 | AC | 26 ms
9,108 KB |
testcase_06 | AC | 27 ms
9,172 KB |
testcase_07 | AC | 27 ms
9,060 KB |
testcase_08 | AC | 26 ms
9,232 KB |
testcase_09 | AC | 26 ms
9,108 KB |
testcase_10 | AC | 26 ms
9,232 KB |
testcase_11 | AC | 26 ms
9,052 KB |
testcase_12 | AC | 26 ms
9,148 KB |
testcase_13 | AC | 27 ms
9,140 KB |
ソースコード
#!/usr/bin/env python3 import string ALPHAS = string.ascii_lowercase NUM_ALPHAS = len(ALPHAS) def helloworld_num(ctr): res = ctr["h"] * ctr["e"] * ctr["w"] * ctr["r"] * ctr["d"] res *= ctr["o"] // 2 res *= ctr["o"] - ctr["o"] // 2 n = ctr["l"] res *= max(x * (x - 1) * (n - x) // 2 for x in range(n + 1)) return res def main(): ctr = dict(zip(ALPHAS, (int(input()) for _ in range(NUM_ALPHAS)))) print(helloworld_num(ctr)) if __name__ == '__main__': main()