Created
August 14, 2019 00:02
-
-
Save sofhiasouza/4008cb782d221d7ed06611b388a5c92c 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 main() | |
{ | |
int k, resp = 0; | |
cin >> k; | |
for(int i = 0 ; i < 5 ; i++) | |
{ | |
int a, b; | |
cin >> a >> b; | |
if(a%k == 1) resp += b; | |
} | |
cout << resp << endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment