#2631. 倍数统计

倍数统计

Description

给定整数 <math xmlns="http://www.w3.org/1998/Math/MathML">a,b 与正整数 <math xmlns="http://www.w3.org/1998/Math/MathML">c,求出在 <math xmlns="http://www.w3.org/1998/Math/MathML">a 到 <math xmlns="http://www.w3.org/1998/Math/MathML">b 之间(包含 <math xmlns="http://www.w3.org/1998/Math/MathML">a 与 <math xmlns="http://www.w3.org/1998/Math/MathML">b)有多少整数是 <math xmlns="http://www.w3.org/1998/Math/MathML">c 的倍数。数据保证在a到b之间至少存在一个是c的倍数,其中0也是c的倍数。

Input Format

  • 第一行:两个整数 <math xmlns="http://www.w3.org/1998/Math/MathML">a 与 <math xmlns="http://www.w3.org/1998/Math/MathML">b
  • 第二行:单个正整数 <math xmlns="http://www.w3.org/1998/Math/MathML">c

Output Format

  • 单个整数:表示答案。
4 6
5
1

Hint

  • 109ab109
  • <math xmlns="http://www.w3.org/1998/Math/MathML">1c109

Source

数学 上海市2023年2月赛