結果
| 問題 | 
                            No.1729 ~サンプルはちゃんと見て!~ 16進数と8進数(1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             ibukiti
                         | 
                    
| 提出日時 | 2021-11-05 22:01:47 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 32 ms / 2,000 ms | 
| コード長 | 424 bytes | 
| コンパイル時間 | 192 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 10,752 KB | 
| 最終ジャッジ日時 | 2024-11-06 12:51:22 | 
| 合計ジャッジ時間 | 1,747 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 24 | 
ソースコード
from collections import Counter
n=input()
n_16=int(n,16)
n_8=oct(n_16)
numlis=list(str(n_8))[2:]
c=Counter(numlis)
v=c.most_common()
v.append(("A",0))
numlist=[]
if len(v)>1:
    for i in range(1,len(v)):
        x1,y1=v[i-1]
        x2,y2=v[i]
        if y1==y2:
            numlist.append(x1)
        else:
            numlist.append(x1)
            break
else:
    print(v[0][1])
    exit()
numlist.sort()
print(*numlist)
            
            
            
        
            
ibukiti