Submission #7050

# Submission time Handle Problem Language Result Execution time Memory
7050 2014-07-20T10:27:55 Z koosaga 쉬운 문제 (GA3_easy) C++
Compilation error
0 ms 0 KB
#include <stdio.h>

int main(){
    int n,i,j=1,r=0;
    scanf("%d",&n);
    int a[n];
    for (i=0; i<n; i++) {
        scanf("%d",&a[i]);
    }
    for (i=0; i<n-1; i++) {
        for (j=i+1; j<n; j++) {
            if(a[j]%a[i]==0) r++;
        }
    }
    printf("%d",r);
}

Compilation message

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