Wrong Answer
Code
#include <stdio.h>
int main() {
int T;
scanf("%d", &T);
while (T--) {
int N;
scanf("%d", &N);
if (N == 1) {
printf("0\n");
} else {
int X = (N * (N - 1)) / 2;
int total = X + (N - 1);
printf("%d\n", total);
}
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1026 LUFA cup 2024
- Contest
- Brain booster #2
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2024-03-06 14:44:20
- Judged At
- 2024-11-11 03:41:49
- Judged By
- Score
- 0
- Total Time
- 0ms
- Peak Memory
- 320.0 KiB