mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Powered By HC TECH : AutoACer Engine
This commit is contained in:
parent
cd6b38581c
commit
d635275d42
27
HDOJ/1017_autoAC.cpp
Normal file
27
HDOJ/1017_autoAC.cpp
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
#include <iostream>
|
||||||
|
using namespace std;
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int N;
|
||||||
|
int n,m;
|
||||||
|
cin>>N;
|
||||||
|
int p = 1;
|
||||||
|
while(p <= N)
|
||||||
|
{
|
||||||
|
if(p != 1)
|
||||||
|
cout<<endl;
|
||||||
|
int cnt = 1;
|
||||||
|
while(cin>>n>>m && n||m)
|
||||||
|
{
|
||||||
|
int count = 0;
|
||||||
|
for(int a = 1;a <= n-2;++a)
|
||||||
|
for(int b = a+1;b <= n-1;++b)
|
||||||
|
if((a*a + b*b + m)%(a*b) == 0)
|
||||||
|
++count;
|
||||||
|
cout<<"Case "<<cnt<<":"<<" "<<count<<endl;
|
||||||
|
++cnt;
|
||||||
|
}
|
||||||
|
++p;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user