Tags » Tariff

UVa Problem P12157 Solution in C

UVa Problem: 12157 – Tarif Plan.

Link: http://uva.onlinejudge.org/external/121/12157.pdf

Solution in C:


#include <stdio.h>
#include <stdlib.h>

int Mile(int t){
    int p=0;

    while(t>=0){
        t = t-30;
        p=p+10;
    }
    return p;

}

int Juice(int t){

    int p=0;

    while(t>=0){
        t = t-60;
        p=p+15;
    }
    return p;
}

int main()
{
    int caseCount,i,callCount,j,callDuration,callCostMile,callCostJuice;
    scanf("%d",&caseCount);

    for(i=0;i<caseCount;i++){
        scanf("%d",&callCount);
        callCostJuice = 0;
        callCostMile = 0;
        for(j=0;j<callCount;j++){
            scanf("%d",&callDuration);
            callCostMile = callCostMile + Mile(callDuration);
            callCostJuice = callCostJuice + Juice(callDuration);
        }

        if(callCostMile>callCostJuice){
            printf("Case %d: Juice %d\n",i+1,callCostJuice);
        }else if(callCostMile<callCostJuice){
            printf("Case %d: Mile %d\n",i+1,callCostMile);
        }else{
            printf("Case %d: Mile Juice %d\n",i+1,callCostJuice);
        }
    }
    return 0;
}

UVa

Beijing May Pour Salt Into Hong Kong's Wounds As Retailers Suffer

A watch and jewelry store next to a shop for rent in Hong Kong’s Causeway Bay shopping district last week. REUTERS

A mainland Chinese government initiative to boost spending at home could grind salt in the wounds of Hong Kong’s already struggling retail sector. 507 more words

Double-Digit Tariff Reductions Could Help More Than a Million Fuel Vulnerable Households


Tuesday 28 April, 2015 As the final price cut to standard gas prices by a big six energy supplier takes effect this Thursday (30th April), a new analysis fromuSwitch.com reveals how the tariff reductions will impact ‘fuel vulnerable’ consumers who spend 10% or more of their annual income on energy. 125 more words

The new Chinese rare earth resource tax to ‘sharply’ increase prices

Source:Investor Intel

Summary:

  • Export tariffs of rare earths will officially be abolished in May
  • Beijing has countered with a “strict export license” to maintain its control over the country’s rare earths exports…
  • 63 more words
Rare Earths

China Poised To Scrap Rare Earth Export Duties

Source: Law360 (requires registration)

Summary:

  • Export duties on precious rare earth elements used in the production of hybrid cars and mobile phones are to be removed beginning May 1…
  • 26 more words
China

Triumphant Plutocracy - Episode #4

An insiders view on how bankers, corporations, and lawyers took over the United States Government and became the “Rulers of America” during the Gilded Age.  Written with true authority by a man who had a front row seat for it all, R. 188 more words

Audiobook Archive

The National Roaming Tariffs Set to Reduce by Virtue of the TRAI’s Tariff Order

In a step towards implementing the One Nation – Free Roaming objective of the National Telecom Policy, 2012, the Telecom Regulatory Authority of India (“ 292 more words

Telecommunications