কায়কোবাদ সরকার's blogs
Computer Programming
Tuesday, 10 February 2015
Solution Of Light Online Judge 1069
#include<stdio.h>
int main()
{
int me,lift,i,j,k,pos,u;
scanf("%d",&k);
for(i=1;i<=k;i++){
scanf("%d%d",&me,&lift);
if(me>lift){
u=((me-lift)*2)+lift;
pos=(u*4)+19;
}
else{
pos=(lift*4)+19;
}
printf("Case %d: %d\n",i,pos);
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment