Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void func(int &s, int x=1000000000){
- if (x<=s)
- s=x;
- }
- int main() {
- int s=1000000000, x, n;
- cin >> n;
- for(int i=0; i<n; i++){
- cin >> x;
- if (i<=n) func(s, x);
- else func(s);
- }
- cout << s;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement