結果
| 問題 | No.2419 MMA文字列2 |
| コンテスト | |
| ユーザー |
とりゐ
|
| 提出日時 | 2023-08-12 13:33:24 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 121 ms / 2,000 ms |
| + 941µs | |
| コード長 | 174 bytes |
| 記録 | |
| コンパイル時間 | 68 ms |
| コンパイル使用メモリ | 82,000 KB |
| 実行使用メモリ | 84,256 KB |
| 最終ジャッジ日時 | 2026-09-26 17:02:59 |
| 合計ジャッジ時間 | 4,042 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 30 |
ソースコード
s=input()
ans=0
from collections import defaultdict
cnt=defaultdict(int)
for i in s:
for j in cnt:
if j!=i:
c=cnt[j]
ans+=c*(c-1)//2
cnt[i]+=1
print(ans)
とりゐ