ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2066. Simple Expression

Show all messages Hide all messages

What's in the 2nd test? Glumaks 3 Dec 2021 19:08
#include <stdio.h>
int main(void) {
    int a, b, c, max, min, med;
    scanf("%d %d %d", &a, &b, &c);
    max = a >= b && a >= c? a: b >= a && b >= c? b: c;
    min = a <= b && a <= c? a: b <= a && b <= c? b: c;
    med = a + b + c - min - max;
    if (med == 0)
        printf("%d", - max);
    else
        printf("%d", min - max * med);
    return 0;
}
Re: What's in the 2nd test? DeterministicChoco232 4 May 2023 16:43
I'd assume something like
0
1
2
Re: What's in the 2nd test? zerumi 6 Jul 2024 19:45
1
1
1

answer: -1