摘要:
求A^B的最后三位数表示的整数。说明:A^B的含义是“A的B次方” 思路:后三位只跟后三位相乘有关,所以可以每乘一次都对1000取余。 代码: #include <stdio.h>#include <stdlib.h> int main(){ int result,i,m,n; while(scan 阅读全文
摘要:
Problem Description Given a positive integer N, you should output the most right digit of N^N. Input The input contains several test cases. The first 阅读全文
摘要:
Problem Description Julius Caesar lived in a time of danger and intrigue. The hardest situation Caesar ever faced was keeping himself alive. In order 阅读全文
摘要:
Problem Description Given 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)/(ab) is an intege 阅读全文
摘要:
Problem Description(数根) The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit 阅读全文
摘要:
Problem Description In many applications very large integers numbers are required. Some of these applications are using keys for secure transmission o 阅读全文
摘要:
Problem Description The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at w 阅读全文