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
Sample Output
Source
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); } } } }
相关文章推荐
- 1182 -- 对决
- C#_C#中[],List,Array,ArrayList的区别及应用
- 切换时区,实时刷新时间。。 今天的时间, 周几的信息。。超过7天显示年月日
- java判断时间是否是今天
- CLR via C#(10)-参数
- linux命令(7)ubuntu的vim命令用法
- ThinkPHP中使用Ueditor富文本编辑器
- js实现拉幕效果的广告代码
- 【数据结构】-常用排序算法对比
- 利用cmd命令(bat文件)生成WebServiceClient并调用
- unity3d 单例模式
- W3c学习笔记——JS基础
- Mysql的存储引擎之:MEMORY存储引擎
- 1181 -- 队花的烦恼
- 1180 -- 三点顺序
- 统计0-1分布
- SQL Server添加MDW性能监控报表(转载)
- SystemID
- CLR via C#(09)-扩展方法
- CKEDITOR使用与配置