QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#869569 | #10. 卡常数 | yangcanning | Compile Error | / | / | C++23 | 236b | 2025-01-25 11:22:59 | 2025-01-25 11:23:00 |
Judging History
answer
#include"bits/stdc++.h"
using namespace std;
constexpr int square(int x) {
return x * x;
}
//constexpr int result = square(100);
constexpr bool result[100000000] = { square(100) };
int main() {
cout << result << endl;
}
Details
answer.code:7:44: error: narrowing conversion of ‘10000’ from ‘int’ to ‘bool’ [-Wnarrowing] 7 | constexpr bool result[100000000] = { square(100) }; | ~~~~~~^~~~~