mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
15 lines
246 B
C++
15 lines
246 B
C++
|
#include <cstdio>
|
||
|
#define LL __int64
|
||
|
int main()
|
||
|
{
|
||
|
LL x,k;
|
||
|
while(scanf("%I64d",&x)&&x){
|
||
|
k=1;
|
||
|
while(k<x)k=k*10+1;
|
||
|
k/=10;
|
||
|
while(x%k!=0)k/=10;
|
||
|
printf("%I64d\n",x/k);
|
||
|
}
|
||
|
return 0;
|
||
|
}
|