답안 #2939

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
2939 2013-08-13T10:44:57 Z imsifile 쉬운 문제 (GA3_easy) C++
컴파일 오류
0 ms 0 KB
#include<stdio.h>
int n,ba[55],cnt,i,j;main(){scanf("%d",&n);for(;i<n;i++)scanf("%d",&ba[i]);for(i=0;i<n;i++){for(j=0;j<i;j++)cnt+=!(ba[i]%ba[j]);}printf("%d",cnt);}

Compilation message

easy.cpp:2:27: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
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]
easy.cpp:2:75: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
/tmp/ccDWp4ub.o: In function `main':
easy.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccO7O8Rn.o:grader.cpp:(.text.startup+0x0): first defined here
/tmp/ccO7O8Rn.o: In function `main':
grader.cpp:(.text.startup+0x97): undefined reference to `CountPair(int, int*)'
collect2: ld returned 1 exit status