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 integer. This problem contains multiple test cases! The first line of a multiple input is an integer N…
A Mathematical Curiosity Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 41995 Accepted Submission(s): 13502 Problem Description Given two integers n and m, count the number of pairs of integ…
A Mathematical Curiosity Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 25871 Accepted Submission(s): 8174 Problem Description Given two integers n and m, count the number of pairs of integ…
//2014.10.17 01:19 //题意: //先输入一个数N,然后分块输入,每块输入每次2个数,n,m,直到n,m同一时候为零时 //结束,当a和b满足题目要求时那么这对a和b就是一组 //注意: //每一块的输出中间有一个回车 A Mathematical Curiosity Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s…
题目:pid=1017">点击打开链接 #include<stdio.h> int main() { int t; scanf("%d",&t); while(t--) { int a=0; int m,n; while(scanf("%d%d",&n,&m)) { if(m==0&&n==0) break; a++; int i,j,k,z=0; for(i=1;i<n;i++) for(j…
题目链接 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 integer. This problem contains multiple test cases! The first line of a multiple input is an inte…
#include<stdio.h> int main() { int N; int n,m; int a,b; int cas; scanf("%d",&N); while(N--) { cas=1;//必须在这儿初始化cas,坑 while(scanf("%d%d",&n,&m),n||m) { int count=0; for(a = 1; a < n; a++)//穷举法 { for(b = a + 1; b <…
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 integer. This problem contains multiple test cases! The first line of a multiple input is an integer N…
传送门: http://acm.hdu.edu.cn/showproblem.php?pid=1017 A Mathematical Curiosity Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 47658 Accepted Submission(s): 15285 Problem Description Given two…
A Mathematical Curiosity Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 31177 Accepted Submission(s): 9988 Problem Description Given two integers n and m, count the number of pairs of integers (a…
A Mathematical Curiosity Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other) Total Submission(s) : 87 Accepted Submission(s) : 23 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description Given two in…
此题不难就是输出格式麻烦 #include<stdio.h> int main(){ int T; scanf("%d",&T); while(T--) { int n,m,num=0; while(scanf("%d %d",&n,&m)&&n!=0) { int a,b,sum=0; for(…
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 integer. This problem contains multiple test cases! The first line of a multiple input is an integer N…
题目链接 /* Name: Copyright: Author: Date: 2018/5/3 16:32:15 Description: */ #include <iostream> #include <cstdio> using namespace std; int n, m; bool equals(int a, int b) { )return true; return false; } int main() { int t; cin>>t; while (t-…
A Mathematical Curiosity http://acm.hdu.edu.cn/showproblem.php?pid=1017 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 22366 Accepted Submission(s): 7021 Problem Description Given two integ…
A Mathematical Curiosity Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) 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)…
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 56784 Accepted Submission(s): 19009 Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats g…
Nasty Hacks Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3049 Accepted Submission(s): 2364 Problem Description You are the CEO of Nasty Hacks Inc., a company that creates small pieces of…
Box of Bricks Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5994 Accepted Submission(s): 2599 Problem Description Little Bob likes playing with his box of bricks. He puts the bricks one up…
Problem Description Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is over, they will count the balloons of each color…