#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
//ofstream o("op.txt");
ll i,j,k,l,m,n,num;
for(k=1;;k++)
{
cin>>n>>num;
if(n==0&&num==0)
break;
cout<<"Case "<<k<<": ";
ll ans;
bool flag=0;
for(i=1;i<=27;i++)
{
if(num*i>=n)
{
ans=i-1;
flag=1;
break;
}
}
if(flag)
cout<<ans<<endl;
else
cout<<"impossible"<<endl;
}
return 0;
}
using namespace std;
typedef long long ll;
int main()
{
//ofstream o("op.txt");
ll i,j,k,l,m,n,num;
for(k=1;;k++)
{
cin>>n>>num;
if(n==0&&num==0)
break;
cout<<"Case "<<k<<": ";
ll ans;
bool flag=0;
for(i=1;i<=27;i++)
{
if(num*i>=n)
{
ans=i-1;
flag=1;
break;
}
}
if(flag)
cout<<ans<<endl;
else
cout<<"impossible"<<endl;
}
return 0;
}
No comments:
Post a Comment