Problem:
Score: 200 points

Problem Statement

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 1

0 5

Sample Output 1

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.

Sample Input 2

1 11

Sample Output 2

1100

The integers that can be divided by 100 exactly once are as follows: 100, 200, 300, 400, 500, 600, 700, 800, 900, 1 \ 000, 1 \ 100, ...

Thus, the integer we are seeking is 1 \ 100.

Sample Input 3

2 85

Sample Output 3

850000

The integers that can be divided by 100 exactly twice are as follows: 10 \ 000, 20 \ 000, 30 \ 000, ...

Thus, the integer we are seeking is 850 \ 000.

Solution in Haskell (GHC 7.10.3) (judge verdict: Accepted)

{-# LANGUAGE CPP #-}

module Main where

import qualified Data.Vector.Unboxed as V
import qualified Data.Map.Strict as M
import Control.Monad
import qualified Data.ByteString.Char8 as BS
import Data.Maybe
import Data.Char
import qualified Data.List as L

dump :: (Show a) => a -> IO ()

#if __GLASGOW_HASKELL__ >= 800
dump x = print x
#else
dump _ = pure ()
#endif

-- "101010" -> [1,0,1,0,1,0]
readToList :: String -> [ Int ]
readToList [] = []
readToList (x : xs) = read [ x ] : readToList xs

readInt :: BS.ByteString -> Int
readInt = fst . fromJust . BS.readInt

getInt :: IO Int
getInt = readInt <$> BS.getLine

-- "10 10 10" -> [10, 10, 10]
getList :: IO [ Int ]
getList = (fmap (read . BS.unpack) . BS.words) <$> BS.getLine

-- "10 10 10" -> [10, 10, 10]
getIntVec :: Int -> IO (V.Vector Int)
getIntVec n = V.unfoldrN n (BS.readInt . BS.dropWhile isSpace) <$> BS.getLine

readmat :: Int -> IO [ [ Int ] ]
readmat rows = replicateM rows getList

newtype UF a = UF (M.Map a a)
    deriving ( Show ) -- Map node parent

makeuf :: Int -> UF Int
makeuf n = let m = M.fromList $ zip [ 0 .. n ] [ 0 .. n ] in UF m

unionUF :: ( Eq a, Ord a ) => a -> a -> UF a -> UF a
unionUF l r uf @ (UF m) = let lp = findUF l uf
                              rp = findUF r uf in if lp == rp then uf
    else if size l uf < size r uf then UF $ M.update (const $ Just rp) lp m
        else UF $ M.update (const $ Just lp) rp m

findUF :: ( Eq a, Ord a ) => a -> UF a -> a
findUF x uf @ (UF m) = let px = m M.! x in if px == x then px else findUF px uf -- TODO 貼り直し

size :: ( Eq a, Ord a ) => a -> UF a -> Int
size x (UF m) = M.size $ M.filter (\par -> par == x) m

genbit :: Int -> [ [ Int ] ]
genbit 0 = []
genbit 1 = [ [ 0 ], [ 1 ] ]
genbit len = do
    x <- [ 0, 1 ]
    map (x :) $ genbit (len - 1)

base :: Int
base = 10 ^ 9 + 7

forn :: ( Num a, Enum a, Monad m ) => a -> (a -> m b) -> m [ b ]
forn x = forM [ 0 .. (x - 1) ]

count :: (Eq a) => a -> [ a ] -> Int
count y = length . filter (== y)

main :: IO ()
main = do
    [ d, n ] <- getList
    if n /= 100 then print $ 100 ^ d * n else print $ 100 ^ d * (n + 1)