Unknown Language Round 2

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
72 Unknown Language Round 2 FINISHED False 10800 475768223 March 20, 2011, 4:10 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 194 ) A Goshtasp, Vishtasp and Eidi PROGRAMMING *special greedy math 1900

Goshtasp was known to be a good programmer in his school. One day Vishtasp, Goshtasp's friend, asked him to solve this task: Given a positive integer n , you should determine whether n is rich. The positive integer x is rich, if there exists some set of distinct numbers a 1 , a 2 , ..., a m such that . In addition: every a i should be either a prime number, or equal to 1 . Vishtasp said that he would share his Eidi 50 / 50 with Goshtasp, if he could solve the task. Eidi is money given to children for Noruz by their parents and/or relatives. Goshtasp needs to solve this problem to get money, you need to solve it to get score! Input contains a single positive integer n ( 1 ≤ n ≤ 10000 ). If the number is not rich print 0 . Otherwise print the numbers a 1 , ..., a m . If several solutions exist print the lexicographically latest solution. Answers are compared as sequences of numbers, not as strings. For comparing two sequences a 1 , ..., a m and b 1 , ..., b n we first find the first index i such that a i ≠ b i , if a i < b i then a is lexicographically earlier and if b i < a i then b is lexicographically earlier. If m ≠ n we add zeroes at the end of the smaller sequence (only for the moment of comparison) and then perform the comparison. You do not need to minimize the number of elements in sequence (i.e. m ). You just need to print the lexicographically latest solution. See samples to find out how to print the sequence.

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
3818155 yermak0v A June 3, 2013, 9:27 a.m. OK Io TESTS 102 156 307200 1900
345809 ivan.popelyshev A March 20, 2011, 5:42 p.m. OK Io TESTS 102 170 4608000 1900
345467 wrong A March 20, 2011, 5:08 p.m. OK Io TESTS 102 170 4608000 1900
346304 biochem_fan A March 20, 2011, 6:40 p.m. OK Io TESTS 102 170 4710400 1900
3669338 Omelianenko A May 4, 2013, 1:38 p.m. OK Io TESTS 102 171 307200 1900
61402622 vjudge4 A Sept. 28, 2019, 5:51 a.m. OK Io TESTS 102 186 307200 1900
61402588 singhpriyank A Sept. 28, 2019, 5:50 a.m. OK Io TESTS 102 186 307200 1900
60585901 Anar A Sept. 14, 2019, 9:12 p.m. OK Io TESTS 102 186 307200 1900
526233 DoublePointer A July 2, 2011, 4:42 p.m. OK Io TESTS 102 190 4608000 1900
482885 MAK A June 8, 2011, 9:08 a.m. OK Io TESTS 102 190 4608000 1900

remove filters

Back to search problems