結果

問題 No.1729 ~サンプルはちゃんと見て!~ 16進数と8進数(1)
ユーザー tassei903tassei903
提出日時 2021-11-05 21:58:59
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 593 bytes
コンパイル時間 1,408 ms
コンパイル使用メモリ 86,768 KB
実行使用メモリ 71,472 KB
最終ジャッジ日時 2023-08-06 09:48:56
合計ジャッジ時間 3,824 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,228 KB
testcase_01 AC 71 ms
71,256 KB
testcase_02 AC 70 ms
71,324 KB
testcase_03 AC 71 ms
71,372 KB
testcase_04 AC 72 ms
71,176 KB
testcase_05 AC 72 ms
71,028 KB
testcase_06 AC 71 ms
71,328 KB
testcase_07 AC 72 ms
71,232 KB
testcase_08 AC 71 ms
71,472 KB
testcase_09 AC 72 ms
71,232 KB
testcase_10 AC 72 ms
71,236 KB
testcase_11 AC 73 ms
71,192 KB
testcase_12 AC 74 ms
71,224 KB
testcase_13 AC 75 ms
71,468 KB
testcase_14 AC 73 ms
71,312 KB
testcase_15 AC 72 ms
71,036 KB
testcase_16 AC 73 ms
71,112 KB
testcase_17 AC 74 ms
71,116 KB
testcase_18 AC 71 ms
71,304 KB
testcase_19 AC 72 ms
71,428 KB
testcase_20 AC 72 ms
71,172 KB
testcase_21 AC 72 ms
71,360 KB
testcase_22 AC 71 ms
71,180 KB
testcase_23 AC 72 ms
71,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
sys.setrecursionlimit(10**7)
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################

n = input()
a = 0
f = 1
for i in n[::-1]:
    a+=f*(ord(i)-65+10)
    f*=16
z = [0]*8
while a>0:
    z[a%8]+=1
    a//=8
m = max(z)
ans = []
for i in range(8):
    if z[i]==m:
        ans.append(i)
print(*ans)
0