1 solutions
-
0
C++ :
#include <bits/stdc++.h> using namespace std; int a[100]; int main() { int n, ans = 0; for (int i = 0; i < 100; i++) { cin >> a[i]; if(a[i] == 0) { n = i; break; } } for(int i = 0; i < n; i++) for(int j = 0; j < n; j++) if(a[i] == a[j] * 2) ans++; cout << ans << endl; return 0; }
- 1
Information
- ID
- 177
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By