結果

問題 No.1729 ~サンプルはちゃんと見て!~ 16進数と8進数(1)
ユーザー tamato
提出日時 2021-11-05 21:23:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 665 bytes
コンパイル時間 524 ms
コンパイル使用メモリ 82,392 KB
実行使用メモリ 54,416 KB
最終ジャッジ日時 2024-11-06 12:07:00
合計ジャッジ時間 2,016 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    N = input().rstrip('\n')

    cnt = [0] * 8
    for n in N:
        cnt[1] += 1
        if n == "A":
            cnt[2] += 1
        elif n == "B":
            cnt[3] += 1
        elif n == "C":
            cnt[4] += 1
        elif n == "D":
            cnt[5] += 1
        elif n == "E":
            cnt[6] += 1
        else:
            cnt[7] += 1
    ma = -1
    I = []
    for x in range(8):
        if cnt[x] > ma:
            ma = cnt[x]
            I = [x]
        elif cnt[x] == ma:
            I.append(x)
    print(*I)


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