Toggle navigation
CGOJ
F.A.Qs
ProblemSet
Source/Category
Status
Ranklist
Contest
Login
Language
中文
ئۇيغۇرچە
English
فارسی
ไทย
한국어
Problem4519--最近的数字
4519: 最近的数字
[Creator :
]
Time Limit :
1.000
sec
Memory Limit :
128 MiB
Submit
Solved: 0
Submit Num: 3
Statistics
ShowOff!
Description
给定两个正整数
lns="http://www.w3.org/1998/Math/MathML">
n
n
与
lns="http://www.w3.org/1998/Math/MathML">
d
d
,请找到所有最接近
lns="http://www.w3.org/1998/Math/MathML">
n
n
且是
lns="http://www.w3.org/1998/Math/MathML">
d
d
的倍数的整数。
Input
第一行:单个整数表示
lns="http://www.w3.org/1998/Math/MathML">
n
n
第二行:单个整数表示
lns="http://www.w3.org/1998/Math/MathML">
d
d
1
≤
n
≤
1
,
0
0
0
,
0
0
0
,
0
0
0
lns="http://www.w3.org/1998/Math/MathML">
1
≤
d
≤
1
,
000
,
000
,
000
1
≤
d
≤
1
,
0
0
0
,
0
0
0
,
0
0
0
Output
若干行:每行一个整数,表示满足要求的答案,若有多个数字满足要求,则以从小到大的顺序输出。
Sample Input
Copy
100 3
Sample Output
Copy
99
Source/Category
分支结构