結果

問題 No.1729 ~サンプルはちゃんと見て!~ 16進数と8進数(1)
ユーザー 👑 rin204rin204
提出日時 2021-12-12 23:12:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 277 bytes
コンパイル時間 1,136 ms
コンパイル使用メモリ 87,024 KB
実行使用メモリ 71,532 KB
最終ジャッジ日時 2023-09-28 17:13:15
合計ジャッジ時間 3,865 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
71,376 KB
testcase_01 AC 78 ms
71,372 KB
testcase_02 AC 81 ms
71,412 KB
testcase_03 AC 77 ms
71,248 KB
testcase_04 AC 78 ms
71,248 KB
testcase_05 AC 79 ms
71,456 KB
testcase_06 AC 79 ms
71,272 KB
testcase_07 AC 78 ms
71,248 KB
testcase_08 AC 79 ms
71,308 KB
testcase_09 AC 80 ms
71,384 KB
testcase_10 AC 80 ms
71,392 KB
testcase_11 AC 80 ms
71,360 KB
testcase_12 AC 79 ms
71,088 KB
testcase_13 AC 78 ms
71,496 KB
testcase_14 AC 77 ms
71,340 KB
testcase_15 AC 76 ms
71,320 KB
testcase_16 AC 78 ms
71,344 KB
testcase_17 AC 78 ms
71,284 KB
testcase_18 AC 78 ms
71,132 KB
testcase_19 AC 78 ms
71,408 KB
testcase_20 AC 77 ms
71,532 KB
testcase_21 AC 77 ms
71,392 KB
testcase_22 AC 79 ms
71,136 KB
testcase_23 AC 78 ms
71,304 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()[::-1]
l = len(S)
cnt = [0] * 8
for i in range(0, l, 3):
    T = S[i:i+3]
    T = T[::-1]
    n = int(T, 16)
    while n:
        cnt[n % 8] += 1
        n //= 8
max_ = max(cnt)
ans = []
for i, c in enumerate(cnt):
    if c == max_:
        ans.append(i)
print(*ans)
0