結果
| 問題 | No.1994 Confusing Name |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-07-01 22:33:08 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1,955 ms / 2,000 ms |
| + 892µs | |
| コード長 | 419 bytes |
| 記録 | |
| コンパイル時間 | 63 ms |
| コンパイル使用メモリ | 81,168 KB |
| 実行使用メモリ | 94,580 KB |
| 最終ジャッジ日時 | 2026-09-30 05:14:52 |
| 合計ジャッジ時間 | 27,422 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
import sys
from collections import defaultdict
input = lambda: sys.stdin.readline().rstrip()
# ----------------------- #
n = int(input())
S = [input() for _ in range(n)]
st = set(S)
alp = 'abcdefghijklmnopqrstuvwxyz'
for s in S:
ans = 0
for i in range(len(s)):
for c in alp:
if s[i] == c:
continue
t = list(s)
t[i] = c
if ''.join(t) in st:
ans += 1
print(ans)