Submission #198033

#TimeUsernameProblemLanguageResultExecution timeMemory
198033alradSpiderman (COCI20_spiderman)C++17
14 / 70
2074 ms1576 KiB
#include <bits/stdc++.h> using namespace std; int main() { ios_base :: sync_with_stdio(0); cin.tie(0) , cout.tie(0); int n , k; cin >> n >> k; vector<int> h(n); for (int i = 0; i < n; i++) { cin >> h[i]; } for (int i = 0; i < n; i++) { int tot = 0; for (int j = 0; j < n; j++) { if (i == j) { continue; } if (h[i] % h[j] == k) { tot++; } } cout << tot << " "; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...