結果

問題 No.1458 Segment Function
ユーザー googol_S0googol_S0
提出日時 2021-03-31 21:13:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 312 bytes
コンパイル時間 331 ms
コンパイル使用メモリ 87,076 KB
実行使用メモリ 77,284 KB
最終ジャッジ日時 2023-08-02 17:28:45
合計ジャッジ時間 4,353 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,180 KB
testcase_01 AC 67 ms
71,232 KB
testcase_02 AC 67 ms
71,040 KB
testcase_03 AC 69 ms
71,164 KB
testcase_04 AC 68 ms
71,228 KB
testcase_05 AC 69 ms
71,244 KB
testcase_06 AC 69 ms
71,056 KB
testcase_07 AC 69 ms
71,252 KB
testcase_08 AC 77 ms
76,408 KB
testcase_09 AC 75 ms
76,064 KB
testcase_10 AC 78 ms
76,572 KB
testcase_11 AC 74 ms
76,340 KB
testcase_12 AC 76 ms
76,512 KB
testcase_13 AC 70 ms
71,856 KB
testcase_14 AC 71 ms
71,668 KB
testcase_15 AC 69 ms
71,672 KB
testcase_16 AC 70 ms
71,944 KB
testcase_17 AC 73 ms
71,852 KB
testcase_18 AC 81 ms
77,168 KB
testcase_19 AC 80 ms
76,836 KB
testcase_20 AC 80 ms
76,680 KB
testcase_21 AC 80 ms
76,648 KB
testcase_22 AC 80 ms
77,164 KB
testcase_23 AC 70 ms
71,036 KB
testcase_24 AC 74 ms
71,972 KB
testcase_25 AC 70 ms
71,172 KB
testcase_26 AC 78 ms
77,004 KB
testcase_27 AC 77 ms
77,284 KB
testcase_28 AC 70 ms
71,044 KB
testcase_29 AC 68 ms
71,880 KB
testcase_30 AC 71 ms
71,936 KB
testcase_31 AC 68 ms
71,836 KB
testcase_32 AC 76 ms
76,452 KB
testcase_33 AC 74 ms
76,324 KB
testcase_34 AC 75 ms
76,488 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

P,N=input().split()
if N=='0':
  print(P)
  exit()
X=[6,2,5,5,4,5,6,4,7,6]
def f(x):
  if x[0]=='-':
    return 1+f(x[1:])
  r=0
  for i in range(len(x)):
    r+=X[int(x[i])]
  return r

if len(N)<=2:
  N=int(N)
  for i in range(N):
    P=str(f(P))
  print(P)
  exit()
for i in range(100):
  P=str(f(P))
print(P)
0