Skip to content

Instantly share code, notes, and snippets.

@Thiago4532
Created April 25, 2019 16:45
Show Gist options
  • Save Thiago4532/dba3c58f9f827a8ba8a7ddc90622284e to your computer and use it in GitHub Desktop.
Save Thiago4532/dba3c58f9f827a8ba8a7ddc90622284e to your computer and use it in GitHub Desktop.
#include <bits/stdc++.h>
using namespace std;
int cartas[1010];
int resp[3];
int main() {
int n, N, K, c = 0;
cin >> n;
for(int i = 0; i < n; i++){
cin >> cartas[i];
}
for(int i = 0; i < 3; i++){
cin >> N >> K;
for(int j = 0; j < n; j++){
if((K-cartas[j])%N == 0){
resp[i]++;
}
}
}
for(int i = 0; i < 3; i++){
cout << resp[i] << "\n";
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment