結果

問題 No.1729 ~サンプルはちゃんと見て!~ 16進数と8進数(1)
ユーザー sanao10000
提出日時 2021-11-05 22:10:10
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 299 bytes
コンパイル時間 107 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-11-06 12:59:45
合計ジャッジ時間 1,698 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input(),16)
n8=oct(n)
stn16=str(n)
stn=str(n8)
stn8=stn[2::]
N8=[]
N16=[]
a=[]
for j in range(0,10):
    N8.append(stn8.count(str(j)))
for i, j in zip(range(0,10), N8):
    a.append((i,j))
maxi=max(N8)

ans=[]
for (i,j) in a:
    if j==maxi:
        ans.append(i)
        continue

print(*ans)
0