How many integers can you find Time Limit:5000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Description Now you get a number N, and a M-integers set, you should find out how many integers which are small than N, that they can divi…
Problem Description On the way to the next secret treasure hiding place, the mathematician discovered a cave unknown to the map. The mathematician entered the cave because it is there. Somewhere deep in the cave, she found a treasure chest with a com…
Problem Description Mr. Hdu is interested in Greatest Common Divisor (GCD). He wants to find more and more interesting things about GCD. Today He comes up with Range Greatest Common Divisor Query (RGCDQ). What’s RGCDQ? Please let me explain it to you…
Description 求∑∑((n mod i)*(m mod j))其中1<=i<=n,1<=j<=m,i≠j. Input 第一行两个数n,m. Output 一个整数表示答案mod 19940417的值 Sample Input 3 4 Sample Output 1 样例说明 答案为(3 mod 1)*(4 mod 2)+(3 mod 1) * (4 mod 3)+(3 mod 1) * (4 mod 4) + (3 mod 2) * (4 mod 1) + (3 mod…
Given the N integers, you have to find the maximum GCD (greatest common divisor) of every possible pair of these integers. Input The first line of input is an integer N (1 < N < 100) that determines the number of test cases. The following N lines ar…