您的位置:首页 > 其它

1183 -- 整除个数(1)

2015-09-02 15:01 363 查看
整除个数(1)
Time Limit:1000MS Memory Limit:65536K

Total Submit:249 Accepted:120
Description
1、2、3… …n这n(0< n< =10000)个数中有多少个数可以被正整数b整除。

Input
输入包含多组数据

每组数据占一行,每行给出两个正整数n、b。

Output
输出每组数据相应的结果。

Sample Input
2 1
5 3
10 4

Sample Output
2
1
2

Source
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AK1183 {
class Program {
static void Main(string[] args) {

string sb;
while ((sb = Console.ReadLine()) != null) {
string[] s = sb.Split();
long a = long.Parse(s[0]), b = long.Parse(s[1]);
Console.WriteLine(a / b);
}
}
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: