#include<iostream> #include<math.h> using namespace std; int main(){ int N; int d=0; while(cin>>N){ d++; if(N<=3){ printf("Case #%d: 5",d); cout<<"\n"; } else{ int res=N-3; long long money=ceil(1.5*res)+5; printf("Case #%d: %d",d,money); cout<<"\n"; } } } |
Double click to view unformatted code.