1 solutions
-
0
C :
#include<stdio.h> int main() { int n,a,b; scanf("%d",&n); while(n--) { scanf("%d%d",&a,&b); if(b==0) printf("ERROR\n"); else if(a%b==0) printf("YES\n"); else printf("NO\n"); } return 0; }C++ :
#include <cstdio> #include <cstring> using namespace std ; int main() { int n ; scanf("%d" ,&n ) ; while( n -- ) { int a , b ; scanf("%d%d" , &a , &b ) ; if( b == 0 ) printf("ERROR\n") ; else if( a % b == 0 ) printf("YES\n") ; else printf("NO\n") ; } return 0 ; }
- 1
Information
- ID
- 20199
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By