Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#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
You can’t perform that action at this time.