Created
April 25, 2019 16:45
-
-
Save Thiago4532/dba3c58f9f827a8ba8a7ddc90622284e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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