結果

問題 No.1362 [Zelkova 8th Tune] Black Sheep
ユーザー 👑 KazunKazun
提出日時 2020-12-05 19:06:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 822 ms / 1,000 ms
コード長 319 bytes
コンパイル時間 2,120 ms
コンパイル使用メモリ 86,852 KB
実行使用メモリ 82,040 KB
最終ジャッジ日時 2023-10-14 01:04:08
合計ジャッジ時間 33,706 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 814 ms
81,092 KB
testcase_01 AC 811 ms
81,180 KB
testcase_02 AC 812 ms
81,340 KB
testcase_03 AC 808 ms
81,100 KB
testcase_04 AC 810 ms
81,412 KB
testcase_05 AC 806 ms
80,932 KB
testcase_06 AC 808 ms
81,144 KB
testcase_07 AC 804 ms
81,140 KB
testcase_08 AC 810 ms
81,148 KB
testcase_09 AC 810 ms
81,004 KB
testcase_10 AC 813 ms
81,016 KB
testcase_11 AC 810 ms
80,936 KB
testcase_12 AC 813 ms
81,092 KB
testcase_13 AC 815 ms
81,932 KB
testcase_14 AC 818 ms
81,908 KB
testcase_15 AC 809 ms
80,952 KB
testcase_16 AC 807 ms
81,424 KB
testcase_17 AC 809 ms
81,672 KB
testcase_18 AC 812 ms
81,372 KB
testcase_19 AC 813 ms
81,980 KB
testcase_20 AC 813 ms
81,644 KB
testcase_21 AC 818 ms
81,632 KB
testcase_22 AC 811 ms
81,808 KB
testcase_23 AC 818 ms
81,992 KB
testcase_24 AC 814 ms
81,908 KB
testcase_25 AC 807 ms
81,744 KB
testcase_26 AC 816 ms
81,832 KB
testcase_27 AC 819 ms
81,760 KB
testcase_28 AC 820 ms
81,944 KB
testcase_29 AC 818 ms
81,724 KB
testcase_30 AC 817 ms
81,736 KB
testcase_31 AC 822 ms
81,828 KB
testcase_32 AC 817 ms
82,040 KB
testcase_33 AC 815 ms
81,952 KB
testcase_34 AC 816 ms
81,884 KB
testcase_35 AC 810 ms
81,096 KB
testcase_36 AC 811 ms
81,252 KB
testcase_37 AC 817 ms
81,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#別解5
from random import randint
from collections import defaultdict
from time import time
import sys

S=input()

X=0
N=len(S)
D=defaultdict(int)
BEGIN=time()

while time()-BEGIN<0.70:
    i=randint(0,N-1)
    D[S[i]]+=1
    X+=1

alpha=min(D,key=lambda x:D[x])
print(S.index(alpha)+1,alpha)
print(X,file=sys.stderr)
0