Submission #14374

#TimeUsernameProblemLanguageResultExecution timeMemory
14374ggoh쉬운 문제 (GA3_easy)C++98
Compilation error
0 ms0 KiB
#include<cstdio> int a[100],b,i,j,x; int main(){scanf("%d",&b); for(i=0;i<b;i++)scanf("%d",&a[i]); for(i=0;i<b-1;i++)for(j=i+1;j<b;j++)if(a[j]%a[i]==0)x++; printf("%d",x);}

Compilation message (stderr)

easy.cpp: In function ‘int main()’:
easy.cpp:3:26: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
 int main(){scanf("%d",&b);
                          ^
easy.cpp:4:34: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
 for(i=0;i<b;i++)scanf("%d",&a[i]);
                                  ^
/tmp/cc1PlnGh.o: In function `main':
easy.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccJf5HMW.o:grader.cpp:(.text.startup+0x0): first defined here
/tmp/ccJf5HMW.o: In function `main':
grader.cpp:(.text.startup+0x97): undefined reference to `CountPair(int, int*)'
collect2: error: ld returned 1 exit status