#include <iostream> #include <cmath> using namespace std; int main(){ int N,k=1; while(scanf("%d",&N)!=EOF){ int mon=5; if(N<=3){ cout<<"Case #"<<k++<<": "<<mon<<endl; }else{ mon=(ceil)((N-3)*1.5+5); cout<<"Case #"<<k++<<": "<<mon<<endl; } } return 0; } |
Double click to view unformatted code.