結果
問題 | No.1994 Confusing Name |
ユーザー | tassei903 |
提出日時 | 2022-07-01 22:15:29 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 765 bytes |
コンパイル時間 | 975 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 558,268 KB |
最終ジャッジ日時 | 2024-05-04 16:36:30 |
合計ジャッジ時間 | 5,196 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 52 ms
63,616 KB |
testcase_01 | AC | 51 ms
62,208 KB |
testcase_02 | AC | 51 ms
61,952 KB |
testcase_03 | AC | 43 ms
53,504 KB |
testcase_04 | AC | 44 ms
53,632 KB |
testcase_05 | AC | 101 ms
90,752 KB |
testcase_06 | AC | 151 ms
98,988 KB |
testcase_07 | AC | 83 ms
75,776 KB |
testcase_08 | AC | 136 ms
92,892 KB |
testcase_09 | AC | 163 ms
103,264 KB |
testcase_10 | AC | 116 ms
90,368 KB |
testcase_11 | AC | 116 ms
90,752 KB |
testcase_12 | MLE | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
ソースコード
import sys input = lambda :sys.stdin.readline()[:-1] ni = lambda :int(input()) na = lambda :list(map(int,input().split())) yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES") no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO") ####################################################################### n = ni() s = [input() for i in range(n)] from collections import defaultdict d = defaultdict(int) for i in range(n): d[s[i]] += 1 for i in range(n): z = list(s[i]) ans = 0 for j in range(len(s[i])): for k in range(26): if ord(z[j])-97!=k: x = z[j] z[j] = chr(97+k) ans += d["".join(z)] z[j] = x print(ans)