mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Create 1425.cpp
This commit is contained in:
parent
6b25a191ce
commit
f5c12d4a49
28
QUSTOJ/1425.cpp
Normal file
28
QUSTOJ/1425.cpp
Normal file
|
@ -0,0 +1,28 @@
|
|||
#include<stdio.h>
|
||||
#define N 600000
|
||||
int main()
|
||||
{
|
||||
int k,m,n;
|
||||
int s1,s2;
|
||||
scanf("%d",&k);
|
||||
while(k--)
|
||||
{
|
||||
scanf("%d%d",&m,&n);
|
||||
s1=0;
|
||||
s2=0;
|
||||
for(int i=1;i<m;i++)
|
||||
{
|
||||
if(m%i==0)
|
||||
s1+=i;
|
||||
}
|
||||
for(int j=1;j<n;j++)
|
||||
{
|
||||
if(n%j==0)
|
||||
s2+=j;
|
||||
}
|
||||
if((s1==n)&&(s2==m))
|
||||
printf("YES\n");
|
||||
else printf("NO\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user