結果
問題 |
No.73 helloworld
|
ユーザー |
![]() |
提出日時 | 2022-02-12 01:23:35 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 532 bytes |
コンパイル時間 | 213 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-06-28 00:30:45 |
合計ジャッジ時間 | 1,351 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 8 WA * 6 |
ソースコード
ns=[0]*26 for i in range(26): t=int(input()) ns[i]=t def cal(x): t=1 for i in range(x-1,0,-1): t=max(t,(i*(i-1)) // 2 * (x-i)) return t s='helowrd' ss='helloworld' ans=1 for i in range(len(s)): if ns[ord(s[i])%97] < ss.count(s[i]): ans=0 break else: if s[i] == 'l': t = cal(ns[ord(s[i])%97]) elif s[i] == 'o': t = ns[ord(s[i])%97] - 1 else: t = ns[ord(s[i])%97] ans *= t print(ans)