编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#3335 #1007. 这你也敢信? Compile Error 0 0 ms 0 K C++ 17 / 260 B 197653Zhww 2023-11-25 14:45:44
显示原始代码
#include <stdio.h>
void main() {
    int N;
    scanf("%d", &N);
    while (N % 2 == 0) {
        N /= 2;
    }
    while (N % 3 == 0) {
        N /= 3;
    }
    if (N == 1) {
        printf("Yes");
    } else {
        printf("No");
    }
}

编译信息

/sandbox/1/a.cpp:2:1: error: '::main' must return 'int'
    2 | void main()
      | ^~~~
/sandbox/1/a.cpp: In function 'int main()':
/sandbox/1/a.cpp:5:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    5 |     scanf("%d",&N);
      |     ~~~~~^~~~~~~~~