結果

問題 No.1729 ~サンプルはちゃんと見て!~ 16進数と8進数(1)
ユーザー Goltermann大和Goltermann大和
提出日時 2021-11-05 23:23:05
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 422 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-24 07:20:37
合計ジャッジ時間 1,472 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 29 ms
10,624 KB
testcase_06 AC 29 ms
10,624 KB
testcase_07 WA -
testcase_08 AC 27 ms
10,752 KB
testcase_09 AC 26 ms
10,752 KB
testcase_10 AC 27 ms
10,752 KB
testcase_11 AC 27 ms
10,624 KB
testcase_12 AC 27 ms
10,624 KB
testcase_13 AC 26 ms
10,624 KB
testcase_14 WA -
testcase_15 AC 26 ms
10,624 KB
testcase_16 AC 26 ms
10,624 KB
testcase_17 AC 27 ms
10,752 KB
testcase_18 AC 26 ms
10,624 KB
testcase_19 AC 26 ms
10,752 KB
testcase_20 AC 25 ms
10,752 KB
testcase_21 WA -
testcase_22 AC 27 ms
10,624 KB
testcase_23 AC 27 ms
10,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input(),16)
oct_n = str(oct(n))
n_list = [0,1,2,3,4,5,6,7]
n_count_list =[]
for i in n_list:
    x = oct_n.count(str(i))
    n_count_list.append(x)
count_num_list =[[a,b] for a,b in zip(n_count_list,n_list)]
count_num_list.sort(reverse=True)
ans = [count_num_list[0][1]]
for j in range(1,8):
    if count_num_list[0][0]==count_num_list[j][0]:
        ans.append(count_num_list[j][1])
ans.sort()
print(*ans,sep=" ")
0