Run ID:90471

提交时间:2024-09-15 10:32:15

#include<iostream> #include<iomanip> using namespace std; int main() { int n; cin >> n; int a[10][10]; int mxx = 0,ndd = 10000; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { cin >> a[i][j]; if (mxx < a[i][j]) { mxx = a[i][j]; } if (ndd > a[i][j]) { ndd = a[i][j]; } } } cout << ndd << " " << mxx; }