/ SeriousOJ /

Record Detail

Compile Error

foo.c: In function 'main':
foo.c:11:64: error: invalid operands to binary * (have 'int *' and 'int')
   11 |         printf("Game #%d: %d / %d\n",i+1, arr[i*2 + 1], arr[arr*2]);
      |                                                             ~~~^
      |                                                             |
      |                                                             int *

Code

#include <stdio.h>
int main(){
    int t;
    scanf("%d",&t);
    int arr[100];

    for (int i = 0; i<t; t+=1){
        scanf("%d",&arr[i]);
    }
    for (int i = 0; i<t; i+=1){
        printf("Game #%d: %d / %d\n",i+1, arr[i*2 + 1], arr[arr*2]);
    }
}

Information

Submit By
Type
Submission
Problem
P1001 Achievement-Unlocked
Language
C99 (GCC 13.2.0)
Submit At
2025-05-21 12:23:28
Judged At
2025-05-21 12:23:28
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes