Submission #14370

# Submission time Handle Problem Language Result Execution time Memory
14370 2015-05-13T03:07:53 Z ggoh 쉬운 문제 (GA3_easy) C++
Compilation error
0 ms 0 KB
#import<cstdio>
main(){int a[100],b,i,j,x=0;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

easy.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
 #import<cstdio>
  ^
easy.cpp:2:6: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
 main(){int a[100],b,i,j,x=0;scanf("%d",&b);for(i=0;i<b;i++)scanf("%d",&a[i]);
      ^
easy.cpp: In function ‘int main()’:
easy.cpp:2:43: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
 main(){int a[100],b,i,j,x=0;scanf("%d",&b);for(i=0;i<b;i++)scanf("%d",&a[i]);
                                           ^
easy.cpp:2:77: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
 main(){int a[100],b,i,j,x=0;scanf("%d",&b);for(i=0;i<b;i++)scanf("%d",&a[i]);
                                                                             ^
/tmp/cc13tKK8.o: In function `main':
easy.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccXCuI7Z.o:grader.cpp:(.text.startup+0x0): first defined here
/tmp/ccXCuI7Z.o: In function `main':
grader.cpp:(.text.startup+0x97): undefined reference to `CountPair(int, int*)'
collect2: error: ld returned 1 exit status