답안 #3024

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
3024 2013-08-23T16:23:37 Z movie_jo 쉬운 문제 (GA3_easy) C
컴파일 오류
0 ms 0 KB
#include<stdio.h>

int main()
{
	int A[50],N,i,j,S=0;

	scanf("%d",&N);

	for(i=0;i<N;i++)
		scanf("%d",A+i);

	for(i=0;i<N;i++)
	{
		for(j=0;j<N;j++)
		{
			if(i!=j&&A[i]%A[j]==0)
				S++;
		}
	}
	printf("%d",S);
}

Compilation message

easy.c: In function 'main':
easy.c:7:7: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
easy.c:10:8: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
easy.c:21:1: warning: control reaches end of non-void function [-Wreturn-type]
/tmp/ccUkTUIq.o: In function `main':
easy.c:(.text.startup+0x0): multiple definition of `main'
/tmp/ccfrI6gh.o:grader.c:(.text.startup+0x0): first defined here
/tmp/ccfrI6gh.o: In function `main':
grader.c:(.text.startup+0x97): undefined reference to `CountPair'
collect2: ld returned 1 exit status