結果
| 問題 | No.2419 MMA文字列2 |
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2023-08-12 16:43:06 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 379 ms / 2,000 ms |
| + 641µs | |
| コード長 | 259 bytes |
| 記録 | |
| コンパイル時間 | 618 ms |
| コンパイル使用メモリ | 82,440 KB |
| 実行使用メモリ | 85,680 KB |
| 最終ジャッジ日時 | 2026-09-26 22:34:12 |
| 合計ジャッジ時間 | 7,476 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 30 |
ソースコード
from collections import Counter
from string import ascii_uppercase
from math import comb
S = input()
freq = Counter()
ans = 0
for c in S:
for a in ascii_uppercase:
if a == c: continue
ans += comb(freq[a], 2)
freq[c] += 1
print(ans)
norioc