結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 812 ms
80,668 KB
testcase_01 AC 814 ms
80,972 KB
testcase_02 AC 814 ms
80,908 KB
testcase_03 AC 814 ms
80,920 KB
testcase_04 AC 815 ms
80,520 KB
testcase_05 AC 813 ms
80,892 KB
testcase_06 AC 815 ms
80,648 KB
testcase_07 AC 814 ms
80,788 KB
testcase_08 AC 814 ms
81,000 KB
testcase_09 AC 812 ms
81,036 KB
testcase_10 AC 815 ms
80,888 KB
testcase_11 AC 814 ms
80,492 KB
testcase_12 AC 814 ms
80,764 KB
testcase_13 AC 822 ms
81,712 KB
testcase_14 AC 817 ms
81,804 KB
testcase_15 AC 812 ms
80,944 KB
testcase_16 AC 815 ms
81,280 KB
testcase_17 AC 815 ms
81,672 KB
testcase_18 AC 812 ms
81,156 KB
testcase_19 AC 816 ms
81,572 KB
testcase_20 AC 813 ms
81,284 KB
testcase_21 AC 817 ms
81,524 KB
testcase_22 AC 816 ms
81,832 KB
testcase_23 AC 816 ms
81,856 KB
testcase_24 AC 815 ms
81,760 KB
testcase_25 AC 815 ms
81,552 KB
testcase_26 AC 818 ms
81,564 KB
testcase_27 AC 817 ms
81,876 KB
testcase_28 AC 816 ms
81,856 KB
testcase_29 AC 817 ms
81,820 KB
testcase_30 AC 815 ms
81,648 KB
testcase_31 AC 817 ms
81,664 KB
testcase_32 AC 816 ms
81,528 KB
testcase_33 AC 817 ms
81,880 KB
testcase_34 AC 817 ms
81,604 KB
testcase_35 AC 816 ms
81,044 KB
testcase_36 AC 815 ms
80,964 KB
testcase_37 AC 814 ms
80,788 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

S=input()

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

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

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