Untitled
user_5668965
c_cpp
a year ago
427 B
36
Indexable
#include<stdio.h>
int main()
{
long long int k,duplk,r,a=1;
scanf("%lld %lld",&k,&r);
duplk=k;
if(k%10==0||(k-r)%10==0)
printf("1");
else
{
while(1)
{
if(k%10==0||(k-r)%10==0)
{
break;
}
else
{
k=duplk*a;
a++;
}
}
printf("%lld",a-1);
}
return 0;
}Editor is loading...
Leave a Comment