Who Gets the Most Candies? Time Limit:5000MS Memory Limit:131072KB 64bit IO Format:%I64d & %I64u Submit Status Description N children are sitting in a circle to play a game. The children are numbered from 1 to N in clockwise order. Each of th…
Description The sequence of n ? 1 consecutive composite numbers (positive integers that are not prime and not equal to 1) lying between two successive prime numbers p and p + n is called a prime gap of length n. For example, 24, 25, 26, 27, 28 betwee…
一.题目描述 The number 151 is a prime palindrome because it is both a prime number and a palindrome (it is the same number when read forward as backward). Write a program that finds all prime palindromes in the range of two supplied numbers a and b (5 <=…
Constructing Roads Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 20927 Accepted Submission(s): 8023 Problem Description There are N villages, which are numbered from 1 to N, and you should…
1002: Robot Navigation Time Limit: 1 Sec Memory Limit: 128 MB Submit: 4 Solved: 2 Description A robot has been sent to explore a remote planet. To specify the path the robot should take, a program is sent each day. The program consists of a…
The arithmetic sequence, 1487, 4817, 8147, in which each of the terms increases by 3330, is unusual in two ways: (i) each of the three terms are prime, and, (ii) each of the 4-digit numbers are permutations of one another. There are no arithmetic seq…