結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 811 ms
81,032 KB
testcase_01 AC 805 ms
80,836 KB
testcase_02 AC 817 ms
81,020 KB
testcase_03 AC 810 ms
80,976 KB
testcase_04 AC 813 ms
81,152 KB
testcase_05 AC 813 ms
81,068 KB
testcase_06 AC 809 ms
80,924 KB
testcase_07 AC 810 ms
81,176 KB
testcase_08 AC 808 ms
81,048 KB
testcase_09 AC 810 ms
81,188 KB
testcase_10 AC 812 ms
80,808 KB
testcase_11 AC 811 ms
81,348 KB
testcase_12 AC 813 ms
81,260 KB
testcase_13 AC 810 ms
81,808 KB
testcase_14 AC 812 ms
81,612 KB
testcase_15 AC 813 ms
81,188 KB
testcase_16 AC 811 ms
81,204 KB
testcase_17 AC 813 ms
81,600 KB
testcase_18 AC 812 ms
81,472 KB
testcase_19 AC 818 ms
81,916 KB
testcase_20 AC 822 ms
81,568 KB
testcase_21 AC 818 ms
81,484 KB
testcase_22 AC 810 ms
82,068 KB
testcase_23 AC 808 ms
81,832 KB
testcase_24 AC 813 ms
81,840 KB
testcase_25 AC 811 ms
82,116 KB
testcase_26 AC 819 ms
81,844 KB
testcase_27 AC 814 ms
81,760 KB
testcase_28 AC 810 ms
81,892 KB
testcase_29 AC 818 ms
81,876 KB
testcase_30 AC 816 ms
81,764 KB
testcase_31 AC 816 ms
81,936 KB
testcase_32 AC 811 ms
81,692 KB
testcase_33 AC 812 ms
81,796 KB
testcase_34 AC 819 ms
81,820 KB
testcase_35 AC 811 ms
81,028 KB
testcase_36 AC 811 ms
81,352 KB
testcase_37 AC 812 ms
80,964 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

input=sys.stdin.readline
S=input()[:-1]

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