結果
| 問題 |
No.73 helloworld
|
| コンテスト | |
| ユーザー |
はむ吉🐹
|
| 提出日時 | 2017-01-09 19:25:26 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 5,000 ms |
| コード長 | 501 bytes |
| コンパイル時間 | 67 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-06-29 22:23:23 |
| 合計ジャッジ時間 | 1,062 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 |
ソースコード
#!/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()
はむ吉🐹