题解 | #小乐乐与进制转换#
小乐乐与进制转换
https://www.nowcoder.com/practice/242eafef2a704c0ca130d563b7b3ee2d
#include <stdio.h> int main() { long long n,m=0,i=1; scanf("%lld",&n); while(n!=0) { m=m+(n%6)*i; n=n/6; i=i*10; } printf("%lld",m); return 0; }
小乐乐与进制转换
https://www.nowcoder.com/practice/242eafef2a704c0ca130d563b7b3ee2d
#include <stdio.h> int main() { long long n,m=0,i=1; scanf("%lld",&n); while(n!=0) { m=m+(n%6)*i; n=n/6; i=i*10; } printf("%lld",m); return 0; }
相关推荐