Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
102648 王子毅 15求n!>m C++ Accepted 1 MS 280 KB 333 2024-12-22 13:35:41

Tests(10/10):


Code:

#include <iostream> using namespace std; int factorial(int num) { int result = 1; for (int i = 2; i <= num; ++i) { result *= i; } return result; } int main() { int m; cin >> m; int n = 1; while (factorial(n) <= m) { n++; } cout << n << endl; return 0; }