#38166: c++ 自己練習解


twice10160@gmail.com (檸檬pie)

學校 : 不指定學校
編號 : 254335
來源 : [64.189.202.246]
最後登入時間 :
2024-09-11 20:37:03

#include <iostream>
#include <string>
#include<math.h>
#include<vector>
#include <algorithm>

int main()
{
    int z=0, n,k;
    std::vector<int> v;
    std::cin >> n;
    while(n-- && std::cin >>k){
        v.push_back(k) ;
    }

    int max = *max_element(v.begin(), v.end());

    std::cout << max << std::endl;

    return 0;
}