結果
問題 | No.2087 基数の変換 |
ユーザー |
|
提出日時 | 2022-10-07 17:22:33 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 58 ms / 2,000 ms |
コード長 | 804 bytes |
コンパイル時間 | 353 ms |
コンパイル使用メモリ | 82,060 KB |
実行使用メモリ | 62,976 KB |
最終ジャッジ日時 | 2024-06-12 00:23:12 |
合計ジャッジ時間 | 4,343 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 51 |
ソースコード
def I():return int(input())def MAP():return map(int,input().split())def MAPs():return map(str,input().split())def LI(): return list(map(int,input().split()))def TPL(): return tuple(map(int,input().split()))def S():return input()from collections import defaultdict,Counter,dequefrom copy import deepcopyfrom heapq import heapify,heappop,heappushfrom bisect import bisect_left,bisect_rightfrom itertools import accumulate,product,permutations,combinations,combinations_with_replacementfrom math import gcd,ceil,floor,factorial,sqrt,pi,sin,cos,tan,radians,expimport timeimport randominf=float('inf');mod=998244353;Mod=10**9+7#move=[(1,0),(0,1),(-1,0),(0,-1)]n=I()m=I()ans=[]while m:ans.append(str(m%n))m//=nans=ans[::-1]if ans==[]:print(0)exit()print(''.join(ans))