Problem Description You just need to calculate the sum of the formula: 1^2+3^2+5^2+……+ n ^2. Input In each case, there is an odd positive integer n. Output Print the sum. Make sure the sum will not exceed 2^31-1 Sample Input 3 Sample Output 1…
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) 看到这个时间,我懵逼了... 果然,Java就是打表,都不能AC,因为Java的输入是流,需要的时间比C真的长好多.... Problem Description You just need to calculate the sum of the formula: 1^2+3^2+5^2+--+ n ^2. Input In each…
http://acm.hdu.edu.cn/showproblem.php?pid=2139 Problem Description You just need to calculate the sum of the formula: 1^2+3^2+5^2+……+ n ^2. Input In each case, there is an odd positive integer n. Output Print the sum. Make sure the sum will not e…
C - History repeat itself Time Limit:1000MS Memory Limit:32768KB Description Tom took the Discrete Mathematics course in the 2011,but his bad attendance angered Professor Lee who is in charge of the course. Therefore, Professor Lee decided t…
History repeat itself Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 4342 Description Tom took the Discrete Mathematics course in the 2011,but his bad attendance angered Professor Lee who is in…
Fibonacci Check-up Problem Description Every ALPC has his own alpc-number just like alpc12, alpc55, alpc62 etc.As more and more fresh man join us. How to number them? And how to avoid their alpc-number conflicted? Of course, we can number them one by…
Fibonacci Check-up Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 42 Accepted Submission(s): 27 Problem Description Every ALPC has his own alpc-number just like alpc12, alpc55, alpc62 etc.As mo…
This is an interesting question from one of the lab assignments in Introduction to Computer Systems, fall 2018 at Peking University. Problem Description Given a 32-bit integer \(x\)(in two's complement), implement a C function that returns \(\frac{x}…
History repeat itself Time Limit: 1000ms Memory Limit: 32768KB This problem will be judged on HDU. Original ID: 434264-bit integer IO format: %I64d Java class name: Main Prev Submit Status Statistics Discuss Next Type: None None Graph Theory 2…