結果

問題 No.1362 [Zelkova 8th Tune] Black Sheep
ユーザー donutholedonuthole
提出日時 2021-01-22 22:21:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 114 ms / 1,000 ms
コード長 660 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 100,004 KB
最終ジャッジ日時 2024-12-28 02:23:47
合計ジャッジ時間 4,526 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 38
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import math
import collections


# sys.setrecursionlimit(10000001)
INF = 10 ** 20
# MOD = 10 ** 9 + 7
MOD = 998244353


def ni(): return int(sys.stdin.buffer.readline())
def ns(): return map(int, sys.stdin.buffer.readline().split())
def na(): return list(map(int, sys.stdin.buffer.readline().split()))
def na1(): return list(map(lambda x: int(x)-1, sys.stdin.buffer.readline().split()))


# ===CODE===
def main():
    s = list(input())
    cnt = collections.Counter(s)
    res = []
    for k, v in cnt.items():
        if v == 1:
            res.append(s.index(k)+1)
            res.append(k)
    print(*res)


if __name__ == '__main__':
    main()
0