记:
进制转换
AC代码:
#include <stdio.h>
#define K 2 int main(void)
{
int n,ans = ;
scanf("%d",&n);
while ()
{
if (n/K == && n%K == )
{
break;
}
n = n/K;
ans ++;
}
printf("%d",ans);
return ;
}
2022-11-04 20:43:55
记:
进制转换
AC代码:
#include <stdio.h>
#define K 2 int main(void)
{
int n,ans = ;
scanf("%d",&n);
while ()
{
if (n/K == && n%K == )
{
break;
}
n = n/K;
ans ++;
}
printf("%d",ans);
return ;
}
下一篇:java Socket的怪异之处