rev='made'/> name='keywords'/> name='author'/> ANURANAN: UVa Solution 12157 : Tariff Plan

Welcome Note

Anisuzzaman Babla

Software Engineer at D Money Bangladesh Limited

I am an enthusiastic Android developer and interested in the newest technologies and trends. I have in total over five years of active Android development experience. I have worked on numerous projects used by hundreds of thousands of people. Moreover, 5+ of commercially successful apps are live at Google play store made by me.

I am eager to learn new things everyday. At the moment, my focus is on the new Java 8 and 9 language features, RxJava and RxAndroid, Kotlin, architectural patterns on Android (MVVM, MVP, etc.) and of course I am always up for trying out the newest Android libraries.

UVa Solution 12157 : Tariff Plan

#include<stdio.h>
int main()
{
 int T,N,t[100],i,caseno=0,mi,ju;
 scanf("%d",&T);
 while(T--)
 {
  scanf("%d",&N);
  int mi=0,ju=0;
  for(i=0;i<N;++i)
  {
        scanf("%d",&t[i]);
        mi=mi+((t[i]/30)+1);
        ju=ju+((t[i]/60+1));
  }

  mi=mi*10;
  ju=ju*15;
  if(mi<ju) printf("Case %d: Mile %d\n",++caseno,mi);
  else if(mi>ju) printf("Case %d: Juice %d\n",++caseno,ju);
  else printf("Case %d: Mile Juice %d\n",++caseno,ju);
 }
 return 0;
}

No comments:

Post a Comment