Type: Default 1000ms 256MiB

楼层编号

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

小林在NOIP比赛期间住在“新世界”酒店。和其他酒店不一样的是,这个酒店每天都有一个高能的数字t,这个数字在楼层中是不会出现的,以t=3为例,则3、13、31、33等楼层是不存在的,楼层编号为1,2,4,5…所以实际上的4楼才是3楼。

已知小林预订了编号为m层的房间,并且当天高能数字是t,现在他想知道房间所在的真实楼层是多少。

输入

一行两个整数m和t,1≤m≤100000,0≤t≤9,保证m对t合法。

输出

一行一个整数,表示真实楼层。

14 3
12

B班第八天测试

Not Attended
Status
Done
Rule
Ledo
Problem
11
Start at
2025-7-28 19:00
End at
2025-7-28 21:00
Duration
2 hour(s)
Host
Partic.
8