| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 144577 | 王峻熙 | 求三个数的最大值 | C++ | Compile Error | 0 MS | 0 KB | 245 | 2026-01-24 13:22:12 |
#include<iostream> // cin\cout\endl using namespace std; int main(){ nums=list(map(int,input().split())); max_num=nums[0]; for num in nums[1:]; if num>max_num; max_num=num print(f"max={max_num}") return 0; }
Main.cc: In function 'int main()':
Main.cc:4:4: error: 'nums' was not declared in this scope
nums=list(map(int,input().split()));
^
Main.cc:4:18: error: expected primary-expression before 'int'
nums=list(map(int,input().split()));
^
Main.cc:4:28: error: 'input' was not declared in this scope
nums=list(map(int,input().split()));
^
Main.cc:4:37: error: 'map' was not declared in this scope
nums=list(map(int,input().split()));
^
Main.cc:4:38: error: 'list' was not declared in this scope
nums=list(map(int,input().split()));
^
Main.cc:5:5: error: 'max_num' was not declared in this scope
max_num=nums[0];
^
Main.cc:6:9: error: expected '(' before 'num'
for num in nums[1:];
^
Main.cc:6:9: error: 'num' was not declared in this scope
Main.cc:7:5: error: expected primary-expression before 'if'
if num>max_num;
^
Main.cc:7:5: error: expected ';' before 'if'
Main.cc:7:5: error: expected primary-expression before 'if'
Main.cc:7:5: error: expected ')' before 'if'
Main.cc:7:8: error: expected '(' before 'num'
if num>max_num;
^
Main.cc:8:13: error: 'num' was not declared in this scope
max_num=num
^