Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
99464 | 唐安轩 | n!大于k | C++ | Compile Error | 0 MS | 0 KB | 289 | 2024-11-29 18:54:19 |
#include <iostream> int main() { long long k; cin >> k; long long n = 1; long long factorial = 1; while (true) { factorial *= n; if (factorial > k) { break; } n++; } cout <<n <<endl; return 0; }
Main.cc: In function 'int main()': Main.cc:5:5: error: 'cin' was not declared in this scope cin >> k; ^ Main.cc:5:5: note: suggested alternative: In file included from Main.cc:1:0: /usr/include/c++/5/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ Main.cc:15:5: error: 'cout' was not declared in this scope cout <& __os) ^