結果
| 問題 | 
                            No.1729 ~サンプルはちゃんと見て!~ 16進数と8進数(1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             judgelaw
                         | 
                    
| 提出日時 | 2021-11-05 21:28:47 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 328 bytes | 
| コンパイル時間 | 120 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 10,752 KB | 
| 最終ジャッジ日時 | 2024-11-06 12:12:19 | 
| 合計ジャッジ時間 | 1,693 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 9 WA * 15 | 
ソースコード
import sys
input = lambda: sys.stdin.readline().rstrip()
from collections import defaultdict as dd
N=input()
cnt=dd(int)
for a in N:
    cnt[1]+=1
    cnt[ord(a)-63]+=1
ans=[]
maxval=0
for i in range(1,8):
    if cnt[i]==maxval:
        ans.append(i)
    elif cnt[i]>maxval:
        ans=[i]
        maxval=cnt[i]
print(*ans)
            
            
            
        
            
judgelaw