Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int M, N;
- int zbir = 0;
- int smrk = 0;
- cin >> M;
- cin >> N;
- for (int i = 1; i <= N; i += 1)
- {
- smrk += 1;
- if (smrk == 4)
- {
- smrk = 1;
- }
- if (i > M)
- {
- zbir += smrk;
- }
- }
- cout << zbir << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement