結果

問題 No.1729 ~サンプルはちゃんと見て!~ 16進数と8進数(1)
ユーザー kept1994kept1994
提出日時 2022-04-28 18:00:16
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 458 bytes
コンパイル時間 350 ms
コンパイル使用メモリ 87,124 KB
実行使用メモリ 72,116 KB
最終ジャッジ日時 2023-09-10 16:51:00
合計ジャッジ時間 4,269 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
71,544 KB
testcase_01 AC 96 ms
71,516 KB
testcase_02 AC 91 ms
71,580 KB
testcase_03 AC 91 ms
71,800 KB
testcase_04 AC 93 ms
71,516 KB
testcase_05 AC 94 ms
71,592 KB
testcase_06 AC 93 ms
71,776 KB
testcase_07 WA -
testcase_08 AC 96 ms
71,676 KB
testcase_09 AC 95 ms
71,576 KB
testcase_10 AC 91 ms
71,640 KB
testcase_11 AC 94 ms
71,372 KB
testcase_12 AC 92 ms
71,724 KB
testcase_13 AC 92 ms
71,592 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 92 ms
71,740 KB
testcase_20 AC 92 ms
71,748 KB
testcase_21 AC 93 ms
71,740 KB
testcase_22 AC 95 ms
71,736 KB
testcase_23 AC 93 ms
71,572 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
from collections import defaultdict
import sys

MOD = 998244353

def main():
    N = int(input(), 16)
    d = defaultdict(int)
    for i in str(oct(N))[2:]:
        d[int(i)] += 1
    
    res = sorted(d.items(), key=lambda x:x[1], reverse=1)
    s = -1
    ans = []
    for k, v in res:
        if v < s:
            break
        s = v
        ans.append(k)
    print(*ans, sep=" ")
    return

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