摘要:Rightmost DigitTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12357Accepted Submission(s): 4773Problem DescriptionGiven a positive integer N, you should output the most right digit of N^N.InputThe input contains several test cases. The first line
阅读全文
摘要:#include<iostream>using namespace std;int main(){ int n; double sum; double len; while(cin>>len) { if(len==0)break; sum=0; n=0; while(sum<len) { n++; sum+=1.0/(n+1); } cout<<n<<" card(s)"<<endl; } return 0; } HangOverTime Limit: 2000/1000 MS (Java/Others)Me
阅读全文
摘要:The Hardest Problem EverTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7298Accepted Submission(s): 3289Problem DescriptionJulius Caesar lived in a time of danger and intrigue. The hardest situation Caesar ever faced was keeping himself alive. In o
阅读全文
摘要:Keep on Truckin'Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3435Accepted Submission(s): 2369Problem DescriptionBoudreaux and Thibodeaux are on the road again . . ."Boudreaux, we have to get this shipment of mudbugs to Baton Rouge by to
阅读全文
摘要:The 3n + 1 problemTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8757Accepted Submission(s): 3196Problem DescriptionProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In
阅读全文
摘要:Ignatius and the Princess IVTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32767 K (Java/Others)Total Submission(s): 6518Accepted Submission(s): 2325Problem Description"OK, you are not too bad, em... But you can never pass the next test." feng5166 says."I will tell you an o
阅读全文
摘要:Ignatius and the Princess IIITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4680Accepted Submission(s): 3280Problem Description"Well, it seems the first problem is too easy. I will let you know how foolish you are later." feng5166 says.&
阅读全文
摘要:Fibonacci AgainTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15017Accepted Submission(s): 7022Problem DescriptionThere are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2).InputInput consists of a sequence
阅读全文
摘要:EncodingTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11132Accepted Submission(s): 4673Problem DescriptionGiven a string containing only 'A' - 'Z', we could encode it using the following method: 1. Each sub-string containing k sam
阅读全文
摘要:As Easy As A+BTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15920Accepted Submission(s): 6448Problem DescriptionThese days, I am thinking about a question, how can I get a problem as easy as A+B? It is fairly difficulty to do such a thing. Of cou
阅读全文
摘要:Prime Ring ProblemTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8651Accepted Submission(s): 3877Problem DescriptionA ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of num
阅读全文
摘要:A Mathematical CuriosityTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10942Accepted Submission(s): 3371Problem DescriptionGiven two integers n and m, count the number of pairs of integers (a,b) such that 0 < a < b < n and (a^2+b^2 +m)/(a
阅读全文
摘要:VolumeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 531Accepted Submission(s): 159Problem DescriptionThis time your job is to calculate the volume of a special object. The object consists of two orthogonal cylinders. The two cylinders intersect e
阅读全文
摘要:SeasideTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 396Accepted Submission(s): 272Problem DescriptionXiaoY is living in a big city, there are N towns in it and some towns near the sea. All these towns are numbered from 0 to N-1 and XiaoY lives i
阅读全文
摘要:Permutation CountingTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 493Accepted Submission(s): 258Problem DescriptionGiven a permutation a1, a2, … aN of {1, 2, …, N}, we define its E-value as the amount of elements where ai > i. For example, the
阅读全文
摘要:AssignmentsTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 645Accepted Submission(s): 300Problem DescriptionIn a factory, there are N workers to finish two types of tasks (A and B). Each type has N tasks. Each task of type A needs xi time to finish
阅读全文
摘要:Least Common MultipleTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11716Accepted Submission(s): 4278Problem DescriptionThe least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the nu
阅读全文
摘要:Uniform GeneratorTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6215Accepted Submission(s): 2477Problem DescriptionComputer simulations often require random numbers. One way to generate pseudo-random numbers is via a function of the formseed(x+1)
阅读全文
摘要:Digital RootsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 20786Accepted Submission(s): 6161Problem DescriptionThe digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then tha
阅读全文
摘要:u Calculate eTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12753Accepted Submission(s): 5485Problem DescriptionA simple mathematical formula for e iswhere n is allowed to go to infinity. This can actually yield very accurate approximations of e u
阅读全文