摘要:
GuessAccept:180Submit:335Time Limit:3000MSMemory Limit:65536KBDescriptionA competition was just over. It had 3 problems and n players. Each player had an ID number from 1 to n. The final rank was decided by the total score of the 3 problems. The higher the total score was, the higher a player ranked 阅读全文
摘要:
Rightmost DigitAccept:169Submit:441Time Limit:1000MSMemory Limit:65536KBProblem DescriptionGiven a positive integer N, you should output the most right digit of N^N.InputThe input contains several test cases. The first line of the input is a single integer T which is the number of test cases. T test 阅读全文
摘要:
Fence RepairAccept:79Submit:306Time Limit:1000MSMemory Limit:65536KBDescriptionFarmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needsN(1 ≤N≤ 1,000)) planks of wood, each having some integer lengthLi(1 ≤Li≤ 50,000) units. He then purc 阅读全文
摘要:
PermutationAccept:113Submit:308Time Limit:1000MSMemory Limit:65536KBDescriptionWe all know that , when there are n positive integers (namely 1…n) , we can use these n integers to construct n! kinds of permutations . Sort these permutations in lexicographic order . For example , when n = 3 , we can p 阅读全文