結果

問題 No.852 連続部分文字列
ユーザー 👑 KazunKazun
提出日時 2021-03-09 04:46:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 382 ms / 3,153 ms
コード長 165 bytes
コンパイル時間 387 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 79,488 KB
最終ジャッジ日時 2024-04-19 01:35:35
合計ジャッジ時間 9,250 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
63,616 KB
testcase_01 AC 63 ms
63,360 KB
testcase_02 AC 63 ms
63,360 KB
testcase_03 AC 63 ms
63,616 KB
testcase_04 AC 63 ms
63,872 KB
testcase_05 AC 67 ms
64,768 KB
testcase_06 AC 68 ms
64,640 KB
testcase_07 AC 67 ms
64,384 KB
testcase_08 AC 63 ms
63,616 KB
testcase_09 AC 64 ms
63,232 KB
testcase_10 AC 64 ms
64,256 KB
testcase_11 AC 63 ms
63,488 KB
testcase_12 AC 66 ms
64,640 KB
testcase_13 AC 90 ms
77,440 KB
testcase_14 AC 79 ms
73,344 KB
testcase_15 AC 93 ms
77,440 KB
testcase_16 AC 90 ms
77,312 KB
testcase_17 AC 90 ms
77,440 KB
testcase_18 AC 94 ms
77,312 KB
testcase_19 AC 75 ms
69,376 KB
testcase_20 AC 87 ms
77,568 KB
testcase_21 AC 93 ms
77,312 KB
testcase_22 AC 87 ms
77,184 KB
testcase_23 AC 91 ms
77,440 KB
testcase_24 AC 87 ms
77,824 KB
testcase_25 AC 89 ms
77,312 KB
testcase_26 AC 94 ms
77,312 KB
testcase_27 AC 89 ms
77,312 KB
testcase_28 AC 91 ms
77,312 KB
testcase_29 AC 93 ms
77,568 KB
testcase_30 AC 78 ms
72,064 KB
testcase_31 AC 97 ms
77,312 KB
testcase_32 AC 95 ms
77,312 KB
testcase_33 AC 382 ms
79,232 KB
testcase_34 AC 369 ms
79,104 KB
testcase_35 AC 372 ms
79,104 KB
testcase_36 AC 369 ms
79,104 KB
testcase_37 AC 375 ms
79,488 KB
testcase_38 AC 375 ms
79,232 KB
testcase_39 AC 369 ms
79,104 KB
testcase_40 AC 374 ms
79,488 KB
testcase_41 AC 370 ms
79,104 KB
testcase_42 AC 368 ms
79,360 KB
testcase_43 AC 366 ms
79,232 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from string import ascii_lowercase as X
S=input()

N=len(S)
R={x:0 for x in X}
A=0
for i,s in enumerate(S,1):
    R[s]=i
    A+=sum(R.values())
print(A/(N*(N+1)//2))
0