Advertisement
mhdew

C

Nov 29th, 2018
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.24 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5.     long long c,b,s;
  6.     scanf("%lld %lld %lld", &c,&b,&s);
  7.  
  8.     if(c%b==0) printf("0\n");
  9.     else{
  10.       c=c%b;
  11.       if(c%s==0) printf("1\n");
  12.       else printf("-1\n");
  13.     }
  14.    
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement