摘要: 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 阅读全文
posted @ 2012-03-02 09:26 codejustforfun 阅读(304) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2012-03-02 09:22 codejustforfun 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2012-03-02 08:34 codejustforfun 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2012-03-02 08:15 codejustforfun 阅读(194) 评论(0) 推荐(0) 编辑