結果

問題 No.2087 基数の変換
ユーザー Moss_LocalMoss_Local
提出日時 2022-09-30 21:59:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 161 ms / 2,000 ms
コード長 833 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 10,812 KB
実行使用メモリ 32,408 KB
最終ジャッジ日時 2023-08-24 15:30:52
合計ジャッジ時間 11,497 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 150 ms
32,248 KB
testcase_01 AC 150 ms
32,236 KB
testcase_02 AC 149 ms
32,168 KB
testcase_03 AC 149 ms
32,352 KB
testcase_04 AC 149 ms
32,240 KB
testcase_05 AC 150 ms
32,364 KB
testcase_06 AC 153 ms
32,224 KB
testcase_07 AC 151 ms
32,216 KB
testcase_08 AC 161 ms
32,256 KB
testcase_09 AC 156 ms
32,304 KB
testcase_10 AC 152 ms
32,168 KB
testcase_11 AC 150 ms
32,220 KB
testcase_12 AC 151 ms
32,164 KB
testcase_13 AC 150 ms
32,236 KB
testcase_14 AC 152 ms
32,212 KB
testcase_15 AC 150 ms
32,244 KB
testcase_16 AC 156 ms
32,180 KB
testcase_17 AC 151 ms
32,288 KB
testcase_18 AC 151 ms
32,248 KB
testcase_19 AC 150 ms
32,212 KB
testcase_20 AC 151 ms
32,312 KB
testcase_21 AC 150 ms
32,300 KB
testcase_22 AC 150 ms
32,208 KB
testcase_23 AC 150 ms
32,408 KB
testcase_24 AC 151 ms
32,148 KB
testcase_25 AC 151 ms
32,260 KB
testcase_26 AC 152 ms
32,188 KB
testcase_27 AC 151 ms
32,220 KB
testcase_28 AC 150 ms
32,320 KB
testcase_29 AC 150 ms
32,328 KB
testcase_30 AC 150 ms
32,240 KB
testcase_31 AC 151 ms
32,276 KB
testcase_32 AC 149 ms
32,220 KB
testcase_33 AC 150 ms
32,224 KB
testcase_34 AC 156 ms
32,328 KB
testcase_35 AC 150 ms
32,192 KB
testcase_36 AC 152 ms
32,232 KB
testcase_37 AC 151 ms
32,384 KB
testcase_38 AC 151 ms
32,248 KB
testcase_39 AC 154 ms
32,240 KB
testcase_40 AC 152 ms
32,180 KB
testcase_41 AC 152 ms
32,344 KB
testcase_42 AC 154 ms
32,240 KB
testcase_43 AC 160 ms
32,104 KB
testcase_44 AC 154 ms
32,236 KB
testcase_45 AC 161 ms
32,164 KB
testcase_46 AC 155 ms
32,208 KB
testcase_47 AC 152 ms
32,336 KB
testcase_48 AC 152 ms
32,372 KB
testcase_49 AC 153 ms
32,328 KB
testcase_50 AC 155 ms
32,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from cgitb import reset
from collections import defaultdict
from functools import lru_cache
from sys import flags, stdin
import math
import re
import queue
from tokenize import String
import typing
import itertools
import bisect
import statistics
import numpy as np
# from numpy.core.function_base import _needs_add_docstring
# from numpy.core.numeric import outer
input = stdin.readline
MOD = 1000000007
INF = 122337203685477580


def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy > 0:
        out = str(X_dumy % n)+out
        X_dumy = int(X_dumy/n)
    return out


def solve():

    n = int(input().rstrip())
    m = int(input().rstrip())
    if m == 0:
        print(0)
        return

    # m is to change to base n
    p = Base_10_to_n(m, n)
    print(p)
    return


if __name__ == '__main__':
    solve()
0