Md. Arifur Rahman (Sazal)
ক্রমে ক্রমে হ্রাস পাচ্ছে বিবেক, ঘুমিয়ে পড়ছে মানবতা……
Pages
Home
ACM Algorithm
Math
E- Balagurusamy
Basic Program
Assembly Language
Gallery
My Portfolio
Thursday, 19 May 2011
uva 11689-Soda surpuler
#include<stdio.h>
int main()
{
int e,f,c,nb=0;
register int t,n=0;
//freopen("in.txt","r",stdin);
scanf("%d",&t);
while(t--)
{
scanf("%d%d%d",&e,&f,&c);
n=e+f;
while(n>=c)
{
nb+=(n/c);
n=(n/c)+(n%c);
}
printf("%d\n",nb);
nb=0;
}
return(0);
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment