Wrong Answer
Code
#include <stdio.h>
#include <stdlib.h>
int main() {
int T;
scanf("%d", &T);
while (T--) {
int A, B, C;
scanf("%d %d %d", &A, &B, &C);
int mid = (A + B + C) / 3;
int da = abs(A - mid);
int db = abs(B - mid);
int dc = abs(C - mid);
int count=0;
int max = da;
if (db > max) {
max = db;
count++;
}
else if (dc > max) {
max = dc;
count++;
}
printf("%d\n", count);
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1061 Bring equality
- Contest
- Brain Booster #4
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2024-07-14 17:31:16
- Judged At
- 2024-11-11 03:22:54
- Judged By
- Score
- 10
- Total Time
- 11ms
- Peak Memory
- 516.0 KiB