/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 0ms 516.0 KiB
#2 Accepted 0ms 320.0 KiB
#3 Accepted 0ms 320.0 KiB
#4 Accepted 0ms 284.0 KiB
#5 Accepted 0ms 516.0 KiB
#6 Accepted 0ms 420.0 KiB

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