上一页 1 2 3 4 5 6 7 8 ··· 25 下一页
摘要: People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, wher 阅读全文
posted @ 2022-01-11 19:38 Moliay 阅读(15) 评论(0) 推荐(0) 编辑
摘要: A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number 阅读全文
posted @ 2022-01-11 18:09 Moliay 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 如果你是哈利·波特迷,你会知道魔法世界有它自己的货币系统 —— 就如海格告诉哈利的:“十七个银西可(Sickle)兑一个加隆(Galleon),二十九个纳特(Knut)兑一个西可,很容易。”现在,给定哈利应付的价钱P和他实付的钱A,你的任务是写一个程序来计算他应该被找的零钱。 输入格式: 输入在1行 阅读全文
posted @ 2022-01-08 13:04 Moliay 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 记录一下每天的成果,看多久能刷完伐 c2 c/c++快速入门 《算法笔记》2.3小节——C/C++快速入门->选择结构 习题4-10-1 奖金计算 《算法笔记》2.4小节——C/C++快速入门->循环结构 例题5-7 求圆周率pi的近似值 习题5-10 分数序列求和 《算法笔记》2.5小节——C/C 阅读全文
posted @ 2022-01-08 13:02 Moliay 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 输入两个非负10进制整数A和B(<=2^30-1),输出A+B的D (1 < D <= 10)进制数。 输入格式 输入在一行中依次给出3个整数A、B和D。 输出格式 输出A+B的D进制数。 输入样例 123 456 8 输出样例 1103 idea p进制—>十进制:按权相加 eg:p进制的x —> 阅读全文
posted @ 2022-01-07 19:13 Moliay 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 题目描述 We now use the Gregorian style of dating in Russia. The leap years are years with number divisible by 4 but not divisible by 100, or divisible by 阅读全文
posted @ 2022-01-07 18:51 Moliay 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 题目描述 设计一个程序能计算一个日期加上若干天后是什么日期。 输入 输入第一行表示样例个数m,接下来m行每行四个整数分别表示年月日和累加的天数。 输出 输出m行,每行按yyyy-mm-dd的个数输出。 样例输入 1 2008 2 3 100 样例输出 2008-05-13 solution #inc 阅读全文
posted @ 2022-01-07 17:11 Moliay 阅读(11) 评论(0) 推荐(0) 编辑
摘要: Description 编写一个日期类,要求按xxxx-xx-xx 的格式输出日期,实现加一天的操作。 Input 输入第一行表示测试用例的个数m,接下来m行每行有3个用空格隔开的整数,分别表示年月日。测试数据不会有闰年。 Output 输出m行。按xxxx-xx-xx的格式输出,表示输入日期的后一 阅读全文
posted @ 2022-01-07 17:01 Moliay 阅读(12) 评论(0) 推荐(0) 编辑
摘要: Description 给出年分m和一年中的第n天,算出第n天是几月几号。 Input 输入包括两个整数y(1<=y<=3000),n(1<=n<=366)。 Output 可能有多组测试数据,对于每组数据,按 yyyy-mm-dd的格式将输入中对应的日期打印出来。 Sample Input Cop 阅读全文
posted @ 2022-01-07 16:51 Moliay 阅读(22) 评论(0) 推荐(0) 编辑
摘要: description 有两个日期,求两个日期之间的天数,如果两个日期是连续的我们规定他们之间的天数为两天。 Input 有多组数据,每组数据有两行,分别表示两个日期,形式为YYYYMMDD Output 每组数据输出一行,即日期差值 Sample Input Copy 20130101 20130 阅读全文
posted @ 2022-01-07 15:49 Moliay 阅读(19) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 25 下一页