Hotel
Problem LinkSolution by Mr.Olimpia — 100 pts
Code / Notes
#include <bits/stdc++.h>
using namespace std;
int main(){
int D, A, N;
cin >> D >> A >> N;
if(N>=16) cout << (32-N)*(D+14*A);
else cout << (32-N)*(D+(N-1)*A);
}
Last updated 1 week ago