AtCoder Beginner Contest 100 - Ringo's Favorite Numbers

Today, the memorable AtCoder Beginner Contest 100 takes place. On this occasion, Takahashi would like to give an integer to Ringo.

As the name of the contest is AtCoder Beginner Contest 100, Ringo would be happy if he is given a positive integer that can be divided by 100 exactly D times.
Find the N-th smallest integer that would make Ringo happy.

-----Constraints-----
 - D is 0, 1 or 2.
 - N is an integer between 1 and 100 (inclusive).

-----Input-----
Input is given from Standard Input in the following format:
D N

-----Output-----
Print the N-th smallest integer that can be divided by 100 exactly D times.

-----Sample Input-----
0 5

-----Sample Output-----
5

The integers that can be divided by 100 exactly 0 times (that is, not divisible by 100) are as follows: 1, 2, 3, 4, 5, 6, 7, ...

Thus, the 5-th smallest integer that would make Ringo happy is 5.

Source: atcoder | Difficulty: EASY


Solutions:
import sys
lines = [s.rstrip('\n') for s in sys.stdin.readlines()]
(d, n) = [int(num) for num in lines.pop(0).split(' ')]
if n == 100:
	n += 1
ans = 100 ** d * n
print(ans)


(d, n) = map(int, input().split())
print(pow(100, d) * n if n < 100 else pow(100, d) * 101)


(d, n) = map(int, input().split())
if n % 100 != 0:
	ans = 100 ** d * n
else:
	ans = 100 ** d * 101
print(ans)


(d, n) = map(int, input().split())
if n < 100:
	print(n * 100 ** d)
else:
	print((n + 1) * 100 ** d)


(d, n) = map(int, input().split())
print(n * 100 ** d + (100 ** d if n == 100 else 0))


(D, N) = map(int, input().split(' '))
if N == 100:
	N += 1
print(N * 100 ** D)


(d, n) = map(int, input().split(' '))
print((n + (n == 100)) * 100 ** d)


(D, N) = map(int, input().split())
print(((N == 100) + N) * 100 ** D)


(d, n) = list(map(int, input().split()))
start = 100 ** d
counter = 0
while True:
	if start % 100 ** d == 0 and start % 100 ** (d + 1) != 0:
		counter += 1
	if counter == n:
		print(start)
		break
	start += 100 ** d


(D, N) = map(int, input().split())
p = pow(100, D)
if N == 100:
	N = 101
print(p * N)


(d, n) = list(map(int, input().split()))
if d == 0:
	if n == 100:
		ans = 101
	else:
		ans = n
elif d == 1:
	if n == 100:
		ans = 10100
	else:
		ans = n * 100
elif d == 2:
	if n == 100:
		ans = 1010000
	else:
		ans = n * 10000
print(ans)


(D, N) = map(int, input().split())
print((N + (1 if N == 100 else 0)) * 100 ** D)


(d, n) = list(map(int, input().split()))
print(100 ** d * n if n != 100 else 100 ** d * 101)


(D, n) = map(int, input().split())
print(n * 100 ** D if n < 100 else (n + 1) * 100 ** D)


(D, N) = map(int, input().split())
print(100 ** D * N if N != 100 else 100 ** D * 101)


(d, n) = map(int, input().split())
if n == 100:
	n = 101
print(100 ** d * n)


(d, n) = map(int, input().split())
if n == 100:
	n += 1
print(str(n) + '00' * d)


(A, B) = map(int, input().split())
print(100 ** A * (B + (B == 100)))


def main():
	(D, N) = list(map(int, input().split()))
	if D == 0:
		if N <= 99:
			print(N)
		else:
			print(N + 1)
	elif D == 1:
		if N <= 99:
			print(100 * N)
		else:
			print(101 * N)
	elif N <= 99:
		print(10000 * N)
	else:
		print(10100 * N)

def __starting_point():
	main()
__starting_point()


(d, a) = map(int, input().split())
print(100 ** d * a if a != 100 else 100 ** d * (a + 1))


(d, n) = [int(i) for i in input().split()]
print(100 ** d * (n + n // 100))


(a, b) = (int(i) for i in input().split())
if b == 100:
	b += 1
print(100 ** a * b)


(D, N) = list(map(int, input().split()))
if D == 0:
	if N <= 99:
		print(N)
	else:
		print(N + 1)
if D == 1:
	if N <= 99:
		print(N * 100)
	else:
		print(N * 100 + 100)
if D == 2:
	if N <= 99:
		print(N * 10000)
	else:
		print(N * 10000 + 10000)


(D, N) = map(int, input().split())
if N == 100:
	N = 101
print(N * 10 ** (2 * D))


(d, n) = list(map(int, input().split()))
ans = 0
if n != 100:
	ans = 100 ** d * n
else:
	ans = 100 ** d * (n + 1)
print(ans)


(a, b) = map(int, input().split())
if b == 100:
	print(100 ** a * 101)
	return
print(100 ** a * b)


(D, N) = map(int, input().split())
if N < 100:
	print(100 ** D * N)
	return
print(100 ** D * 101)


(d, n) = map(int, input().split())
k = 100 ** d
print([k * (n + 1), k * n][n != 100])


(n, k) = map(int, input().split())
print(100 ** n * 101 if k == 100 else 100 ** n * k)


(d, n) = list(map(int, input().split()))
if n == 100:
	n += 1
print(n * pow(100, d))


(d, n) = map(int, input().split())
print(10 ** (2 * d) * (n + n // 100))


(x, y) = list(map(int, input().split()))
if y == 100:
	y = y + 1
print(100 ** x * y)


def get_input() -> tuple:
	(D, N) = list(map(int, input().split()))
	return (D, N)

def main(D: int, N: int) -> None:
	ans = (N + N // 100) * 100 ** D
	print(ans)

def __starting_point():
	(D, N) = get_input()
	main(D, N)
__starting_point()


import sys
input = sys.stdin.readline

def main():
	(d, n) = map(int, input().split())
	if n == 100:
		print(100 ** d * 101)
		return
	else:
		print(100 ** d * n)

def __starting_point():
	main()
__starting_point()


(d, m) = map(int, input().split())
if m == 100:
	m = 101
print(100 ** d * m)


import sys
input = sys.stdin.readline
(d, n) = list(map(int, input().split()))
if n == 100:
	print(101 * 100 ** d)
	return
print(100 ** d * n)


l = list(map(int, input().split()))
if l[1] != 100:
	print(l[1] * 100 ** l[0])
else:
	print(101 * 100 ** l[0])


import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce
rr = lambda : sys.stdin.readline().rstrip()
rs = lambda : sys.stdin.readline().split()
ri = lambda : int(sys.stdin.readline())
rm = lambda : list(map(int, sys.stdin.readline().split()))
rf = lambda : list(map(float, sys.stdin.readline().split()))
rl = lambda : list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10 ** 9 + 7
(d, n) = rm()
if n != 100:
	print((n - (n - 1) // 99) * 100 ** d)
else:
	print(101 * 100 ** d)


(a, b) = map(int, input().split())
print(int(100 ** a * (b + b // 100)))


(n, m) = map(int, input().split())
if m == 100:
	m = 101
print(100 ** n * m)


(d, n) = map(int, input().split())
if d == 0:
	if n == 100:
		print(101)
	else:
		print(n)
elif d == 1:
	if n == 100:
		print(101 * 100)
	else:
		print(100 * n)
elif n == 100:
	print(101 * 10000)
else:
	print(10000 * n)


(d, x) = map(int, input().split())
print((x + (x == 100)) * 100 ** d)


(d, n) = [int(m) for m in input().split(' ')]
print(100 ** d * (n + n // 100))


(d, n) = map(int, input().split())
flag = 0
if n == 100:
	flag = 1
print(100 ** d * (n + flag))


(L, R) = map(int, input().split())
print(100 ** L * (int((R - 1) / 99) + R))


(A, B) = map(int, input().split())
print(B * 100 ** A if B != 100 else 101 * 100 ** A)


(D, N) = [int(x) for x in input().split()]
print((N + (N == 100)) * pow(100, D))


(d, n) = map(int, input().split())
print([pow(100, d) * n, pow(100, d) * 101][n == 100])


(d, n) = map(int, input().split())
n += n // 100
print(str(n) + '00' * d)


(d, n) = [int(x) for x in input().split()]
print(100 ** d * (n + n // 100))


(D, N) = map(int, input().split())
n = 1
while True:
	if n % 100 ** D == 0 and n % 100 ** (D + 1) != 0:
		N -= 1
	if N == 0:
		print(n)
		break
	n += 1


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
from collections import deque
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def main():
	(D, N) = LI()
	cnt = 0
	num = 0
	for i in range(1, 10 ** 7 + 1):
		if i % 100 ** D == 0 and i % 100 ** (D + 1) > 0:
			cnt += 1
		if cnt == N:
			num = i
			break
	print(num)
main()


(d, n) = map(int, input().split())
if d == 0:
	if n != 100:
		print(n)
	else:
		print(101)
else:
	a = [n] + [0] * 2 ** d
	if n != 10 ** 2:
		print(*a, sep='')
	else:
		a[-(2 * d + 1)] += 1
		print(*a, sep='')


(d, n) = map(int, input().split())
if n == 100:
	if d == 1:
		print(10100)
	elif d == 2:
		print(10000 * 101)
	else:
		print(101)
else:
	print(100 ** d * n)


a = input()
print(int(int(a[2:]) * 1.01) * 100 ** int(a[0]))


(a, b) = map(int, input().split())
if b == 100:
	b += 1
ans = b * 100 ** a
print(ans)


def answer(d: int, n: int) -> int:
	if n == 100:
		n += 1
	return 100 ** d * n

def main():
	(d, n) = map(int, input().split())
	print(answer(d, n))

def __starting_point():
	main()
__starting_point()


lst = input().split()
D = int(lst[0])
N = int(lst[1])
if N == 100:
	N += 1
print(100 ** D * N)


(D, N) = map(int, input().split())
S = 0
if N == 100:
	S = 1
print(100 ** D * (N + S))


import sys
(d, n) = map(int, input().split())
if d == 0:
	if n == 100:
		print('101')
	else:
		print(n)
	return
if n == 100:
	print(100 ** d * 101)
else:
	print(100 ** d * n)


(D, N) = map(int, input().split())
print(100 ** D * [N, 101][N > 99])


(d, n) = map(int, input().split())
if n == 100:
	n += 1
a = n * 100 ** d
print(a)


a = input()
print(int(eval(a[2:5]) * 1.01) * 100 ** eval(a[0]))


(n, m) = [int(x) for x in input().split()]
if m != 100:
	print(100 ** n * m)
else:
	print(100 ** n * (m + 1))


(D, N) = [int(s) for s in input().split()]
if N == 100:
	N += 1
print(100 ** D * N)


(D, N) = map(int, input().split())
a = 0
if N == 100:
	a = 100 ** D
print(100 ** D * N + a)


(n, m) = map(int, input().split())
if m == 100:
	m = m + 1
print(100 ** n * m)


(a, b) = input().split()
a = int(a)
b = int(b)
if b < 100:
	print(100 ** a * b)
elif b == 100:
	print(100 ** a * (b + 1))


(D, N) = list(map(int, input().split()))
if D == 0:
	if N == 100:
		print(101)
	else:
		print(N)
if D == 1:
	if N == 100:
		print(101 * 100)
	else:
		print(N * 100)
if D == 2:
	if N == 100:
		print(101 * 100 ** 2)
	else:
		print(N * 100 ** 2)


(d, n) = tuple(map(int, input().split()))
if n == 100:
	n += 1
print(100 ** d * n)


(D, N) = map(int, input().split())
if N == 100:
	N = 101
ans = N * 100 ** D
print(ans)


(D, N) = list(map(int, input().split()))
if D == 0 and N != 100:
	print(N)
if D == 0 and N == 100:
	print(101)
if D == 1 and N != 100:
	print(N * 100)
if D == 1 and N == 100:
	print(10100)
if D == 2 and N != 100:
	print(N * 10000)
if D == 2 and N == 100:
	print(1010000)


(a, b) = map(int, input().split())
print(100 ** a * b if b != 100 else 100 ** a * 101)


a = input()
print((eval(a[2:]) + len(a) // 5) * 100 ** int(a[0]))


(a, b) = list(map(int, input().split()))
if a == 0 and b == 100:
	print(101)
elif a == 1 and b == 100:
	print(10100)
elif a == 2 and b == 100:
	print(1010000)
else:
	print(100 ** a * b)


(D, N) = list(map(int, input().split()))
ans = (N + N // 100) * 100 ** D
print(ans)


(x, y) = map(int, input().split())
if y == 100:
	y += 1
z = y * 100 ** x
print(z)


(d, n) = map(int, input().split())

def cal(x):
	if x % 100 != 0:
		return 0
	return cal(x / 100) + 1
cnt = 0
tmp = 1
while True:
	if cal(tmp) == d:
		cnt += 1
	if cnt == n:
		break
	tmp += 1
print(tmp)


(D, N) = list(map(int, input().split()))
ans = 0
if D == 0:
	if N % 100 != 0:
		print(N)
	else:
		print(101)
elif D == 1:
	if N % 100 != 0:
		for i in range(N):
			ans += 100 ** D
		print(ans)
	else:
		for i in range(N):
			ans += 100 ** D
		print(ans + 100)
elif N % 100 != 0:
	for i in range(N):
		ans += 100 ** D
	print(ans)
else:
	for i in range(N):
		ans += 100 ** D
	print(ans + 10000)


(d, n) = map(int, input().split())
print(100 ** d * n if n <= 99 else 100 ** d * 101)


import sys
input = sys.stdin.readline
(d, n) = map(int, input().split())
if d == 0:
	if n < 100:
		print(n)
	else:
		print(101)
elif d == 1:
	if n < 100:
		print(n * 100)
	else:
		print(101 * 100)
elif n < 100:
	print(n * 10000)
else:
	print(101 * 10000)


(D, N) = map(int, input().split())
count = 0
if D == 0:
	for i in range(N):
		count += 1
	if N == 100:
		count += 1
	print(count)
elif D == 1:
	for i in range(N):
		count += 100
	if N == 100:
		count += 100
	print(count)
elif D == 2:
	for i in range(N):
		count += 10000
	if N == 100:
		count += 10000
	print(count)


(D, N) = map(int, input().split())
if D == 0 and N <= 99:
	print(1 + N - 1)
elif D == 0 and N == 100:
	print(101)
elif D == 1 and N <= 99:
	print(100 * N)
elif D == 1 and N == 100:
	print(10100)
elif D == 2 and N <= 99:
	print(10000 * N)
elif D == 2 and N == 100:
	print(10000 * 101)


(a, b) = map(int, input().split())
print(str(b + b // 100) + '00' * a)


(D, N) = [int(i) for i in input().split()]
print(100 ** D * (N + N // 100))


(D, N) = map(int, input().split())
if not N % 100:
	N += 1
print(N * 10 ** (2 * D))


def solve(D, N):
	if N < 100:
		ans = 100 ** D * N
	else:
		ans = 100 ** D * 101
	return ans

def __starting_point():
	(D, N) = list(map(int, input().split()))
	print(solve(D, N))
__starting_point()


(D, N) = map(int, input().split())
if N == 100:
	X = 100 ** D * (N + 1)
else:
	X = 100 ** D * N
print(X)


def main():
	(d, n) = list(map(int, input().split()))
	if d == 0:
		print(n + n // 100)
		return
	print(100 ** d * (n + n // 100))

def __starting_point():
	main()
__starting_point()


(D, N) = map(int, input().split())
print((N + (N - 1) // 99) * 100 ** D)


(D, N) = map(int, input().split())
a = 100 ** D
A = []
for i in range(1, 101):
	A.append(i * a)
if D == 0:
	A.remove(100)
	A.append(101)
elif D == 1:
	A.remove(10000)
	A.append(10100)
elif D == 2:
	A.remove(1000000)
	A.append(1010000)
print(A[N - 1])


(n, k) = map(int, input().split())
k = k + 1 if k == 100 else k
print(100 ** n * k)


s = input().split()
(a, b) = (int(s[0]), int(s[1]))
if b == 100:
	b += 1
print(100 ** a * b)


(A, N) = map(int, input().split())
if N < 100:
	print(N * 100 ** A)
else:
	print(101 * 100 ** A)


(D, N) = map(int, input().split())
l = []
for i in range(1, 1100000):
	if i % 100 ** D == 0 and i % 100 ** (D + 1) != 0:
		l.append(i)
print(l[N - 1])


(d, n) = map(int, input().split())
print((n + (n - 1) // 99) * 100 ** d)


(d, n) = list(map(int, input().split()))
if n == 100:
	n += 1
res = 100 ** d * n
print(res)


a = input()
b = a.split()
d = int(b[0])
n = int(b[1])
if n == 100:
	print(100 ** d * (n + 1))
else:
	print(100 ** d * n)


(n, a) = map(int, input().split(' '))
if a != 100:
	print(100 ** n * a)
else:
	print(100 ** n * (a + 1))


(D, N) = list(map(int, input().split()))
D = 100 ** D
if N == 100:
	print(N * D + D)
else:
	print(N * D)


(a, b) = list(map(int, input().split()))
if b != 100:
	ans = 100 ** a * b
else:
	ans = 100 ** a * (b + 1)
print(ans)


(n, k) = map(int, input().split())
if k == 100:
	k += 1
print(pow(100, n) * k)


(D, N) = map(int, input().split())
count = 0
i = 1
while count < N:
	if i % 100 ** (D + 1) != 0 and i % 100 ** (D + 2) != 0 and (i % 100 ** D == 0):
		count += 1
	i += 1
print(i - 1)


(d, n) = map(int, input().split())
print(str(n) + '00' * d if n < 100 else '101' + '00' * d)


(d, n) = map(int, input().split())
print([1, 100, 10000][d] * (n + (n == 100)))


(d, n) = map(int, input().split())
k = n * 100 ** d
if n == 100:
	k += 100 ** d
print(k)


(a, b) = map(int, input().split())
print(100 ** a * b if b < 100 else 100 ** a * (b + 1))


(d, n) = map(int, input().split())
if n == 100:
	n = 101
print(n * 10 ** (2 * d))