摘要:
试题编号:201512-1试题名称:数位之和时间限制:1.0s内存限制:256.0MB 问题描述 给定一个十进制整数n,输出n的各位数字之和。 输入格式 输入一个整数n。 输出格式 输出一个整数,表示答案。 样例输入 20151220 样例输出 13 样例说明 20151220的各位数字之和为2+0 阅读全文
摘要:
问题描述 在一个定义了直角坐标系的纸上,画一个(x1,y1)到(x2,y2)的矩形指将横坐标范围从x1到x2,纵坐标范围从y1到y2之间的区域涂上颜色。 下图给出了一个画了两个矩形的例子。第一个矩形是(1,1) 到(4, 4),用绿色和紫色表示。第二个矩形是(2, 3)到(6, 5),用蓝色和紫色表 阅读全文
摘要:
试题编号:201612-2试题名称:工资计算时间限制:1.0s内存限制:256.0MB 问题描述 小明的公司每个月给小明发工资,而小明拿到的工资为交完个人所得税之后的工资。假设他一个月的税前工资(扣除五险一金后、未扣税前的工资)为S元,则他应交的个人所得税按如下公式计算: 1) 个人所得税起征点为3 阅读全文
摘要:
There is a robot starting at position (0, 0), the origin, on a 2D plane. Given a sequence of its moves, judge if this robot ends up at (0, 0) after it 阅读全文
摘要:
The count and say sequence is the sequence of integers with the first five terms as following: 1. 1 2. 11 3. 21 4. 1211 5. 111221 1 is read off as "on 阅读全文
摘要:
Let's call any (contiguous) subarray B (of A) a mountain if the following properties hold: B.length = 3 There exists some 0 B[i+1] ... B[B.length 1] ( 阅读全文
摘要:
Given a binary matrix A, we want to flip the image horizontally, then invert it, and return the resulting image. To flip an image horizontally means t 阅读全文
摘要:
In the computer world, use restricted resource you have to generate maximum benefit is what we always want to pursue. For now, suppose you are a domin 阅读全文