結果

問題 No.1362 [Zelkova 8th Tune] Black Sheep
ユーザー 👑 KazunKazun
提出日時 2020-12-05 19:07:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 344 bytes
コンパイル時間 305 ms
コンパイル使用メモリ 86,804 KB
実行使用メモリ 81,632 KB
最終ジャッジ日時 2023-10-14 01:08:50
合計ジャッジ時間 34,152 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 818 ms
80,964 KB
testcase_01 AC 815 ms
80,736 KB
testcase_02 AC 818 ms
80,880 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 814 ms
80,892 KB
testcase_07 AC 815 ms
81,088 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 816 ms
81,072 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 816 ms
81,184 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 817 ms
81,596 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 817 ms
81,448 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 815 ms
81,284 KB
testcase_33 AC 816 ms
81,356 KB
testcase_34 AC 822 ms
81,472 KB
testcase_35 AC 816 ms
80,800 KB
testcase_36 AC 813 ms
80,912 KB
testcase_37 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

input=sys.stdin.readline
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