Created
October 2, 2019 20:14
-
-
Save fardinabir/58bdc4050c6509c6359bc6f4cc9c2bcc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<bits/stdc++.h> | |
using namespace std; | |
#define ll long long | |
int main () | |
{ | |
ll tc,idd=0,p,n,a,b,c,c1,c2,c3,t,id,d,l,r,num=1,k,x,i; | |
string st; | |
seive(); | |
scanf("%lld",&tc); | |
while(idd<tc){ | |
cin>>st; | |
scanf("%lld",&a); | |
printf("Case %lld: ",++idd); | |
n=0,i=0; | |
if(st[0]=='-') | |
i++; | |
while(i<st.size()) | |
{ | |
n=n*10+(st[i++]-48); | |
n=n%a; | |
} | |
if(n==0) | |
printf("divisible\n"); | |
else | |
printf("not divisible\n"); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment