Created
July 3, 2017 18:35
-
-
Save riemannulus/4907dad611d8e63d097862f6e7b48c65 to your computer and use it in GitHub Desktop.
Min, Max
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
/* | |
불필요한 설명은 제외함 | |
*/ | |
using namespace std; | |
int main() | |
{ | |
int t; | |
int min=1000001, max=-1000001, in; | |
scanf("%d", &t); | |
while (t--) | |
{ | |
scanf("%d", &in); | |
if (min > in) | |
{ | |
min = in; | |
} | |
if (max < in) | |
{ | |
max = in; | |
} | |
} | |
printf("%d %d", min, max); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment