Skip to content

Instantly share code, notes, and snippets.

@ArthurLoboLobo
Created February 11, 2023 22:17
Show Gist options
  • Save ArthurLoboLobo/456d39f7b11058cd7b4ea9b765808303 to your computer and use it in GitHub Desktop.
Save ArthurLoboLobo/456d39f7b11058cd7b4ea9b765808303 to your computer and use it in GitHub Desktop.
#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