Wrong Answer
Code
#include <stdio.h>
int main() {
int T;
scanf("%d", &T);
while (T--) {
int B;
scanf("%d", &B);
if (B <= 1) {
printf("-1\n");
} else {
int perimeter = B + B - 1 + (int)sqrt(B * B + (B - 1) * (B - 1));
printf("%d\n", perimeter);
}
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1027 Right triangle
- Contest
- Brain booster #2
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2024-03-06 16:06:37
- Judged At
- 2024-11-11 03:41:26
- Judged By
- Score
- 0
- Total Time
- 1ms
- Peak Memory
- 324.0 KiB