View Code of Problem 118

#include<bits/stdc++.h>
using namespace std;

int main(){
	int n,k=1;
	while(cin>>n){
		if(n <= 3){
			printf("Case #%d: 5\n",k++);
		}else{
			int sum = (n-3)*1.5+5+0.5;
			printf("Case #%d: %d\n",k++,sum);
		}
	}
}

Double click to view unformatted code.


Back to problem 118