Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
5937 | 吴承熹 | 13求n个数的最小值 | C++ | Wrong Answer | 0 MS | 264 KB | 302 | 2024-12-21 10:18:54 |
#include<iostream> #include<algorithm> #include<limits.h> using namespace std; int main(){ int _max=1,a; int temp; cin>>a; for(int i=1;i<=a;i++){ cin>>temp; if(temp<_max) swap(temp,_max);//交换temp和_max的值 } cout<<_max<<endl; return 0; }
------Input------
18 52 55 68 17 13 20 92 54 42 58 26 84 41 16 14 61 47 91
------Answer-----
13
------Your output-----
1