Submission #3239

#TimeUsernameProblemLanguageResultExecution timeMemory
3239BothEarRim쉬운 문제 (GA3_easy)C++98
Compilation error
0 ms0 KiB
#include <iostream> #include <iomanip> #include <cstdio> #include <string> #include <cstring> #include <cstdlib> #include <cmath> #include <utility> #include <locale> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <list> #include <set> #include <climits> #include <cfloat> #define PI acos(0.0) * 2.0 using namespace std; int N; vector<int> v; int CountPair() { int res = 0; for(int i=0; i<N-1; i++) for(int j=i+1; j<N; j++) if(v[j] % v[i] == 0) res++; return res; } int main() // 쉬운 문제 (GA3_easy) { scanf("%d", &N); v.resize(N); for(int i=0; i<N; i++) scanf("%d", &v[i]); printf("%d\n", CountPair()); return 0; }

Compilation message (stderr)

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