编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#3202 #1007. 这你也敢信? Compile Error 0 0 ms 0 K C++ 17 / 401 B Bruuuh 2023-11-25 14:11:43
显示原始代码
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 6;
const int MOD = 1e9 + 7;
#define ll long long


int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    double N;
    cin >> N;
    while (N % 2 == 0) N /= 2;
    while (N % 3 == 0) N /= 3;
    if (N == 1)
        cout << "Yes" << endl;
    else
        cout << "No" << endl;
    return 0;
}

编译信息

/sandbox/1/a.cpp: In function 'int main()':
/sandbox/1/a.cpp:12:16: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   12 |         while(N%2==0)   N/=2;
      |               ~^~
      |               | |
      |               | int
      |               double
/sandbox/1/a.cpp:13:16: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   13 |         while(N%3==0)   N/=3;
      |               ~^~
      |               | |
      |               | int
      |               double