重复关门
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.
Description
现有一个酒店有n个房间,依次编号为1到n,第一个服务员经过,将所有房间门打开;第二个服务员经过将所有编号为2的倍数的房门打开的关上,关闭的打开;第三个服务员经过将所有编号为3倍数的房门打开的关上,关闭的打开。依此类推;
输入一个100以内的正整数N,输出第m(m<=n)个服务员经过之后,有几扇门是开的。
Input Format
用空格隔开的n和m。
Output Format
一个整数sum,表示有sum扇门 是开的。
Sample
input
5 2
output
3
Hint
时间限制:
20200810数组基本练习
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 12
- Start at
- 2020-8-10 9:48
- End at
- 2020-8-11 9:48
- Duration
- 24 hour(s)
- Host
- Partic.
- 43