上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 76 下一页
摘要: 题目描述: 给定n,a求最大的k,使n!可以被a^k整除但不能被a^(k+1)整除。 两个整数n(2<=n<=1000),a(2<=a<=1000) 一个整数. 阅读全文
posted @ 2018-10-02 10:31 bernieloveslife 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 对于一个不存在括号的表达式进行计算 存在多种数据,每组数据一行,表达式不存在空格 输出结果 阅读全文
posted @ 2018-10-02 10:29 bernieloveslife 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 一个N*M的矩阵,找出这个矩阵中所有元素的和不小于K的面积最小的子矩阵(矩阵中元素个数为矩阵面积) 每个案例第一行三个正整数N,M<=100,表示矩阵大小,和一个整数K 接下来N行,每行M个数,表示矩阵每个元素的值 输出最小面积的值。如果出现任意矩阵的和都小于K,直接输出-1。 阅读全文
posted @ 2018-10-02 10:29 bernieloveslife 阅读(596) 评论(0) 推荐(0) 编辑
摘要: Every positive number can be presented by the exponential form.For example, 137 = 2^7 + 2^3 + 2^0。 Let's present a^b by the form a(b).Then 137 is pres 阅读全文
posted @ 2018-10-02 10:28 bernieloveslife 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Finding all occurrences of a pattern in a text is a problem that arises frequently in text-editing programs. Typically,the text is a document be 阅读全文
posted @ 2018-10-02 10:24 bernieloveslife 阅读(241) 评论(0) 推荐(0) 编辑
摘要: A common typing error is to place the hands on the keyboard one row to the right of the correct position. So "Q" is typed as "W" and "J" is typed as " 阅读全文
posted @ 2018-10-02 10:23 bernieloveslife 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 有两个日期,求两个日期之间的天数,如果两个日期是连续的我们规定他们之间的天数为两天 输入: 有多组数据,每组数据有两行,分别表示两个日期,形式为YYYYMMDD 输出: 每组数据输出一行,即日期差值 样例输入: 20110412 20110422 样例输出: 11 阅读全文
posted @ 2018-10-02 10:22 bernieloveslife 阅读(165) 评论(0) 推荐(0) 编辑
摘要: The Fibonacci Numbers{0,1,1,2,3,5,8,13,21,34,55...} are defined by the recurrence: F0=0 F1=1 Fn=Fn-1+Fn-2,n>=2 Write a program to calculate the Fibona 阅读全文
posted @ 2018-10-02 10:22 bernieloveslife 阅读(188) 评论(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 400. 阅读全文
posted @ 2018-10-02 10:21 bernieloveslife 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 距离s 票价 0<S<=L1 C1 L1<S<=L2 C2 L2<S<=L3 C3 输入保证0<L1<L2<L3<10^9,0<C1<C2<C3<10^9。 每两个站之间的距离不超过L3。 当乘客要移动的两个站的距离大于L3的时候,可以选择从中间一个站下车,然后买票再上车,所以乘客整个过程中至少会买 阅读全文
posted @ 2018-10-02 10:19 bernieloveslife 阅读(270) 评论(0) 推荐(0) 编辑
上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 76 下一页