답안 #8524

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
8524 2014-09-16T00:55:17 Z eric4266 쉬운 문제 (GA3_easy) C
컴파일 오류
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.c: In function 'main':
easy.c:6:6: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
easy.c:8:8: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
/tmp/ccNhpUF1.o: In function `main':
easy.c:(.text.startup+0x0): multiple definition of `main'
/tmp/ccKulhGD.o:grader.c:(.text.startup+0x0): first defined here
/tmp/ccKulhGD.o: In function `main':
grader.c:(.text.startup+0x97): undefined reference to `CountPair'
collect2: ld returned 1 exit status