题解 | #小乐乐与进制转换#
小乐乐与进制转换
https://www.nowcoder.com/practice/242eafef2a704c0ca130d563b7b3ee2d
#include<stdio.h> int main() { int a = 0; int arr[12] = { 0 }; scanf("%d", &a); int i = 0; while (a) { arr[i] = a % 6; a /= 6; i++; } for (int j = i - 1; j >= 0; j--) { printf("%d", arr[j]); } return 0; }