結果

問題 No.1729 ~サンプルはちゃんと見て!~ 16進数と8進数(1)
ユーザー kohei2019kohei2019
提出日時 2023-06-12 01:24:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 95 ms / 2,000 ms
コード長 379 bytes
コンパイル時間 885 ms
コンパイル使用メモリ 86,916 KB
実行使用メモリ 71,944 KB
最終ジャッジ日時 2023-09-01 22:24:37
合計ジャッジ時間 4,316 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
71,940 KB
testcase_01 AC 88 ms
71,932 KB
testcase_02 AC 90 ms
71,896 KB
testcase_03 AC 95 ms
71,704 KB
testcase_04 AC 91 ms
71,696 KB
testcase_05 AC 89 ms
71,592 KB
testcase_06 AC 89 ms
71,944 KB
testcase_07 AC 91 ms
71,604 KB
testcase_08 AC 90 ms
71,728 KB
testcase_09 AC 88 ms
71,608 KB
testcase_10 AC 89 ms
71,556 KB
testcase_11 AC 89 ms
71,760 KB
testcase_12 AC 88 ms
71,452 KB
testcase_13 AC 90 ms
71,380 KB
testcase_14 AC 89 ms
71,468 KB
testcase_15 AC 88 ms
71,696 KB
testcase_16 AC 92 ms
71,744 KB
testcase_17 AC 87 ms
71,740 KB
testcase_18 AC 92 ms
71,756 KB
testcase_19 AC 90 ms
71,552 KB
testcase_20 AC 90 ms
71,780 KB
testcase_21 AC 89 ms
71,552 KB
testcase_22 AC 91 ms
71,740 KB
testcase_23 AC 90 ms
71,924 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()
Nls = []
for i in range(len(N)):
    Nbin = bin(int(N[i],16))[2:]
    Nls.append(Nbin)
jointN = ''.join(Nls)
jointN = jointN[::-1]
import collections
cnt = collections.Counter()
for i in range(0,len(jointN),3):
    cnt[int(jointN[i:i+3][::-1],2)] += 1
maxc = max(cnt.values())
ansls = []
for i in range(8):
    if maxc == cnt[i]:
        ansls.append(i)
print(*ansls)
0