Submission #14259

# Submission time Handle Problem Language Result Execution time Memory
14259 2015-05-09T00:07:47 Z khsoo01 쉬운 문제 (GA3_easy) C++
Compilation error
0 ms 0 KB
#import<iostream>
int i,j,n,a[99],c;main(){std::cin>>n;for(i=0;i<n;i++)std::cin>>a[i];for(i=0;i<n;i++)for(j=i+1;j<n;j++)if(a[j]%a[i]==0)c++;std::cout<<c;}

Compilation message

easy.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
 #import<iostream>
  ^
easy.cpp:2:24: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
 int i,j,n,a[99],c;main(){std::cin>>n;for(i=0;i<n;i++)std::cin>>a[i];for(i=0;i<n;i++)for(j=i+1;j<n;j++)if(a[j]%a[i]==0)c++;std::cout<<c;}
                        ^
/tmp/ccltFos5.o: In function `main':
easy.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/cc158By6.o:grader.cpp:(.text.startup+0x0): first defined here
/tmp/cc158By6.o: In function `main':
grader.cpp:(.text.startup+0x97): undefined reference to `CountPair(int, int*)'
collect2: error: ld returned 1 exit status