欢迎访问XYNUOJ
问题 A:Sky 数
时间限制: 1 Sec 内存限制: 33 MB题目描述
输入
输出
样例输入
2992
1234
0
样例输出
2992 is a Sky Number.
1234 is not a Sky Number.
提示
上面两种方法时间复杂度并未减小!!!!二更具一种通用性。
问题B: Encoding
时间限制: 1 Sec 内存限制: 33 MB题目描述
1. Each sub-string containing k same characters should be encoded to "kX" where "X" is the only character in this sub- string.
2. If the length of the sub-string is 1, '1' should be ignored.
输入
输出
样例输入
2
ABC
ABBCCC
样例输出
ABC
A2B3C
问题C: 分拆素数和
时间限制: 1 Sec 内存限制: 33 MB题目描述
输入
输出
样例输入
30
26
0
样例输出
3
2
问题D: 20岁生日
时间限制: 1 Sec 内存限制: 128 MB题目描述
输入
输出
样例输入
1
1988-03-07
样例输出
7305
问题E: Divisible number
时间限制: 1 Sec 内存限制: 128 MB题目描述
1, 2, 3... ... N this n (0 < n < = 1000000000) in the number of how many Numbers can be divided exactly by positive integer b
输入
Input contains multiple sets of data
Each group of data is a line, each row is given two positive integer n, b.
输出
Input contains multiple sets of data
Each group of data is a line, each row is given two positive integer n, b.
样例输入
2 1
5 3
10 4
样例输出
2
1
2
问题F: Quicksum
时间限制: 1 Sec 内存限制: 128 MBA checksum is an algorithm that scans a packet of data and returns a single number. The idea is that if the packet is changed, the checksum will also change, so checksums are often used for detecting transmission errors, validating document contents, and in many other situations where it is necessary to detect undesirable changes in data.
For this problem, you will implement a checksum algorithm called Quicksum. A Quicksum packet allows only uppercase letters and spaces. It always begins and ends with an uppercase letter. Otherwise, spaces and letters can occur in any combination, including consecutive spaces.
A Quicksum is the sum of the products of each character's position in the packet times the character's value. A space has a value of zero, while letters have a value equal to their position in the alphabet. So, A=1, B=2, etc., through Z=26. Here are example Quicksum calculations for the packets "ACM" and "MID CENTRAL":
ACM: 1*1 + 2*3 + 3*13 = 46
MID CENTRAL: 1*13 + 2*9 + 3*4 + 4*0 + 5*3 + 6*5 + 7*14 + 8*20 +
9*18 + 10*1 + 11*12 = 650
输入
输出
样例输入
ACM
MID CENTRAL
REGIONAL PROGRAMMING CONTEST
ACN
A C M
ABC
BBC
#
样例输出
46
650
4690
49
75
14
15
问题G: Fibonacci Again!
时间限制: 1 Sec 内存限制: 128 MB题目描述
输入
输出
每行输出占一行。
样例输入
2
3
样例输出
Yes
No
问题H: 最少拦截系统
时间限制: 1 Sec 内存限制: 33 MB题目描述
怎么办呢?多搞几套系统呗!你说说倒蛮容易,成本呢?成本是个大问题啊.所以俺就到这里来求救了,请帮助计算一下最少需要多少套拦截系统.
输入
输出
样例输入
8 389 207 155 300 299 170 158 65
样例输出
2