結果
| 問題 | No.1994 Confusing Name |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-29 17:11:39 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 452 bytes |
| 記録 | |
| コンパイル時間 | 166 ms |
| コンパイル使用メモリ | 85,208 KB |
| 実行使用メモリ | 612,812 KB |
| 最終ジャッジ日時 | 2026-03-28 04:49:12 |
| 合計ジャッジ時間 | 5,070 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 MLE * 1 -- * 18 |
ソースコード
import sys
input = sys.stdin.readline
from collections import *
N = int(input())
S = [input()[:-1] for _ in range(N)]
cnt = defaultdict(int)
for Si in S:
cnt[Si] += 1
for Si in S:
ans = 0
for i in range(len(Si)):
for j in range(26):
if ord(Si[i])-ord('a')==j:
continue
T = list(Si)
T[i] = chr(j+ord('a'))
ans += cnt[''.join(T)]
print(ans)