- 龙凤苑中学B班5.14
找最小值 打擂台解法
- @ 2024-5-15 20:45:10
#include <bits/stdc++.h> using namespace std; int a[1000000],b,s=21000000; int main() { cin>>b; for(int i=0;i<b;i++){ cin>>a[i]; } for(int i=0;i<b;i++){ if(a[i]<s){ s=a[i]; } } cout<<s;
return 0; //结束
}
0 comments
No comments so far...