結果

問題 No.1362 [Zelkova 8th Tune] Black Sheep
ユーザー r_ishida
提出日時 2021-01-28 22:18:56
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 42 ms / 1,000 ms
コード長 465 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,648 KB
最終ジャッジ日時 2024-06-26 06:10:24
合計ジャッジ時間 3,256 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 38
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

from collections import Counter

s = S()

if s.count(s[0]) == 1:
    print(1, s[0])
else:
    a = s.replace(s[0], "")
    print(s.index(a)+1, a)
0