Submission #7050

#TimeUsernameProblemLanguageResultExecution timeMemory
7050koosaga쉬운 문제 (GA3_easy)C++98
Compilation error
0 ms0 KiB
#include <stdio.h> int main(){ int n,i,j=1,r=0; scanf("%d",&n); int a[n]; for (i=0; i<n; i++) { scanf("%d",&a[i]); } for (i=0; i<n-1; i++) { for (j=i+1; j<n; j++) { if(a[j]%a[i]==0) r++; } } printf("%d",r); }

Compilation message (stderr)

easy.cpp: In function 'int main()':
easy.cpp:5:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
easy.cpp:8:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
/tmp/ccciiiMw.o: In function `main':
easy.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/cciC7pnr.o:grader.cpp:(.text.startup+0x0): first defined here
/tmp/cciC7pnr.o: In function `main':
grader.cpp:(.text.startup+0x97): undefined reference to `CountPair(int, int*)'
collect2: ld returned 1 exit status