1. Trang chủ
  2. » Tất cả

5 example questions grade 7 9

4 1 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 4
Dung lượng 302,96 KB

Nội dung

7 9 grade Group ( Example Questions) Question #1 Find the largest continuous sum Description Now give you n integers, please find the maximum of the sum of consecutive segments, you can take any of th[.]

7-9 grade Group ( Example Questions) Question #1 : Find the largest continuous sum Description: Now give you n integers, please find the maximum of the sum of consecutive segments, you can take any of them which had the maximum sum (At least one is required) Input Description: The first column of the test data is a positive integer n, The second column has n integers separated by a blank, all between -100 and 100 Output Description: The Output has only one column, representing the largest continuous sum Example input one: Example input two: Example input three: 123 -1 -5 -9 -6 -2 -5 Sample output one: Sample output two: Sample output three: Description: Description: Description: 1+2+3=6 5+( -1)+ 3+( -5)+ 7+(-9) 7+(-2)+3 Rating Description: If the correct result of 1, 2, and could be tested within second, then 11 points will be obtained Question #2: Calculate how many zeros Description: Write m and n (all integers) between these numbers in decimals Totally, how many 0s have you written? Input Description: Test data is only one line, there are two integers where between m, n, Output Description: Please output the between numbers, and count a total of have you wrote? Example input one: Example input two: Example input three: 00 100 199 1000 Sample output one: Sample output two: Sample output three: 20 193 Rating Description: If the result of the review test can be correctly output within second, points are obtained If the result of the review test can be correctly output within second, then another points will be obtained If the result of the review test can be correctly output within second, then another points will be obtained Question #3: Value of the string corresponds Description: we first give each letter in the string a value, let A = 1, B = 2, C = 3, ,Y = 25, Z = 26, and then calculate the sum of the values of the letters in the string For example: the string "KH" is mapped to 11+8 =19 Unfortunately, this method does not correspond to one-to-one correspondence It is possible that the sum of the values of multiple strings is the same For example, the string "AFL" also corresponds to 19 (1+6+12=19) Given L and S, write a program to find the length L, which corresponds to in S the number of strings S that must be considered are all in uppercase letters, and their values are strictly ascending For example: if L=3, S=10 then there are such strings ABG ACF ADE BCE Although AGB and AAH also corresponds L=3, S= 10, but does not comply with regulations strictly increasing; The CG also corresponds to 10, but its length is only Input Description: The test data contains in a line with positive integers L and S( L≤15, S≤200 ) Output Description: Please output the number of matching strings (can be expressed in 32-bit signed integer, no more than 109) Example input one: Example input two: sample input three: 10 20 15 200 Sample output one: Sample output two: Sample output three: 155830 Rating Description: If the result of the review test ( L=7, S≤50 ) can be correctly output within second, points are obtained If the result of review test ( L=10, S≤150 ) can be correctly output within second, then more points will be obtained If the result of the review test ( L=13, S≤200 ) can be correctly output within second, then another points will be obtained ... a total of have you wrote? Example input one: Example input two: Example input three: 00 100 199 1000 Sample output one: Sample output two: Sample output three: 20 193 Rating Description: If the... two: sample input three: 10 20 15 200 Sample output one: Sample output two: Sample output three: 155 830 Rating Description: If the result of the review test ( L =7, S? ?50 ) can be correctly output... integers L and S( L≤ 15, S≤200 ) Output Description: Please output the number of matching strings (can be expressed in 32-bit signed integer, no more than 1 09) Example input one: Example input two:

Ngày đăng: 11/11/2022, 21:30

w