上一页 1 2 3 4 5 6 7 8 ··· 25 下一页
摘要: 题目描述 将一个长度最多为30位数字的十进制非负整数转换为二进制数输出。 输入 多组数据,每行为一个长度不超过30位的十进制非负整数。 (注意是10进制数字的个数可能有30个,而非30bits的整数) 输出 每行输出对应的二进制数。 样例输入 Copy 985 211 1126 样例输出 Copy 阅读全文
posted @ 2022-02-07 14:38 Moliay 阅读(33) 评论(0) 推荐(0)
摘要: Description 求任意两个不同进制非负整数的转换(2进制~16进制),所给整数在long所能表达的范围之内。 不同进制的表示符号为(0,1,…,9,a,b,…,f)或者(0,1,…,9,A,B,…,F)。 Input 输入只有一行,包含三个整数a,n,b。a表示其后的n 是a进制整数,b表示 阅读全文
posted @ 2022-01-15 22:55 Moliay 阅读(16) 评论(0) 推荐(0)
摘要: Description 输入两个不超过整型定义的非负10进制整数A和B(<=231-1),输出A+B的m (1 < m <10)进制数。 Input 输入格式:测试输入包含若干测试用例。每个测试用例占一行,给出m和A,B的值。 当m为0时输入结束。 Output 输出格式:每个测试用例的输出占一行, 阅读全文
posted @ 2022-01-15 20:18 Moliay 阅读(22) 评论(0) 推荐(0)
摘要: If you are a fan of Harry Potter, you would know the world of magic has its own currency system — as Hagrid explained it to Harry, “Seventeen silver S 阅读全文
posted @ 2022-01-11 20:53 Moliay 阅读(14) 评论(0) 推荐(0)
摘要: 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 阅读(21) 评论(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 阅读(23) 评论(0) 推荐(0)
摘要: 如果你是哈利·波特迷,你会知道魔法世界有它自己的货币系统 —— 就如海格告诉哈利的:“十七个银西可(Sickle)兑一个加隆(Galleon),二十九个纳特(Knut)兑一个西可,很容易。”现在,给定哈利应付的价钱P和他实付的钱A,你的任务是写一个程序来计算他应该被找的零钱。 输入格式: 输入在1行 阅读全文
posted @ 2022-01-08 13:04 Moliay 阅读(21) 评论(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 阅读(57) 评论(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 阅读(21) 评论(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 阅读(27) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 25 下一页