結果
問題 | No.2419 MMA文字列2 |
ユーザー |
![]() |
提出日時 | 2023-08-12 16:43:06 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 850 ms / 2,000 ms |
コード長 | 259 bytes |
コンパイル時間 | 236 ms |
コンパイル使用メモリ | 82,116 KB |
実行使用メモリ | 78,376 KB |
最終ジャッジ日時 | 2024-11-20 06:29:22 |
合計ジャッジ時間 | 10,192 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 30 |
ソースコード
from collections import Counterfrom string import ascii_uppercasefrom math import combS = input()freq = Counter()ans = 0for c in S:for a in ascii_uppercase:if a == c: continueans += comb(freq[a], 2)freq[c] += 1print(ans)