結果
問題 | No.1994 Confusing Name |
ユーザー |
![]() |
提出日時 | 2022-07-01 21:29:43 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 1,323 ms / 2,000 ms |
コード長 | 339 bytes |
コンパイル時間 | 435 ms |
コンパイル使用メモリ | 82,348 KB |
実行使用メモリ | 281,592 KB |
最終ジャッジ日時 | 2024-11-26 03:55:26 |
合計ジャッジ時間 | 18,685 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
ソースコード
from collections import defaultdict n=int(input()) d=defaultdict(int) Ss=[] for i in range(n): s=list(input()) m=len(s) for j in range(m): t=s.copy() t[j]='!' t=tuple(t) d[t]+=1 Ss.append(s) for s in Ss: m=len(s) ans=-m for j in range(m): t=s.copy() t[j]='!' t=tuple(t) ans+=d[t] print(ans)