/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 0ms 324.0 KiB
#2 Wrong Answer 1ms 516.0 KiB

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_matches = X + (N - 1);
            
            printf("%d\n", total_matches);
        }
    }

    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 13:56:29
Judged At
2024-11-11 03:42:07
Judged By
Score
0
Total Time
1ms
Peak Memory
516.0 KiB