Accepted
Code
#include <stdio.h>
int main() {
int a,b,c,d;
scanf("%d %d %d %d",&a,&b,&c,&d);
int lowest=a;
if(b<lowest){
lowest=b;
}
if(c<lowest){
lowest=c;
}
if(d<lowest){
lowest=d;
}
int largest = a;
if(b>largest){
largest=b;
}
if(c>largest){
largest=c;
}
if(d >largest){
largest=d;
}
printf("%d\n%d\n",lowest,largest);
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1022 Minmax
- Contest
- Brain booster - 1
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2023-12-31 15:31:40
- Judged At
- 2024-11-11 03:45:40
- Judged By
- Score
- 100
- Total Time
- 0ms
- Peak Memory
- 516.0 KiB