Submission #8523

# Submission time Handle Problem Language Result Execution time Memory
8523 2014-09-16T00:55:03 Z eric4266 쉬운 문제 (GA3_easy) C++
Compilation error
0 ms 0 KB
#include <stdio.h>
 
int main()
{
int i,j,n,A[51],ans=0;
scanf("%d",&n);
 for(i=1;i<=n;i++) {
  scanf("%d",&A[i]);
 }
for(i=1;i<=n;i++) {
 for(j=n;j>0;j--) {
  if(A[j]%A[i]==0&&i<j) ans++;
 }
}
printf("%d",ans);
   return 0;
}

Compilation message

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