結果
| 問題 | 
                            No.1362 [Zelkova 8th Tune] Black Sheep
                             | 
                    
| コンテスト | |
| ユーザー | 
                            👑  Kazun
                         | 
                    
| 提出日時 | 2020-12-05 19:07:41 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 344 bytes | 
| コンパイル時間 | 234 ms | 
| コンパイル使用メモリ | 82,304 KB | 
| 実行使用メモリ | 77,568 KB | 
| 最終ジャッジ日時 | 2024-09-15 20:53:32 | 
| 合計ジャッジ時間 | 30,722 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 23 WA * 15 | 
ソースコード
#別解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)
            
            
            
        
            
Kazun