-
-
Save ArthurLoboLobo/456d39f7b11058cd7b4ea9b765808303 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 d,a,n; cin >> d >> a >> n; | |
int valor; | |
if(n < 16) { | |
valor = d + (n-1)*a; | |
} | |
else { | |
valor = d + 14*a; | |
} | |
int dias = (31-n+1); | |
cout << valor*dias << endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment