6 条题解

  • 0
    @ 2023-12-14 15:20:03

    /站在巨人肩膀上的最优代码/ #include<stdio.h> void convert(int x,int n) { if(x0) return; convert(x/n,n); printf("%d",x%n); } int main() { int x,n; scanf("%d%d",&x,&n); if(x0) printf("0"); else convert(x, n); printf("\n"); while(x>1&&x%n==0) { x /= n; } if(x == 1) printf("yes"); else printf("no"); return 0; }

    信息

    ID
    960
    时间
    1000ms
    内存
    256MiB
    难度
    5
    标签
    递交数
    145
    已通过
    53
    上传者