# zoj 1365 Mileage Bank

//这一题简单题WA了两次，原因就是在于使用了while(1)这个循环输入条件而没有及时的退出循环，
//所以超时了！要特别注意这一些细微之处！
#include "iostream"
#include "string"
using namespace std;

int main()
{
string str1, str2;
int mileage, sum = 0;
char classcode;
while (cin >> str1)
{
if (str1 == "0")
{
cout << sum << endl;
sum = 0;
cin >> str1;
}
if (str1 == "#") return 0;

cin >> str2 >> mileage >> classcode;
if (classcode == 'F')
sum += mileage * 2;
else if (classcode == 'B')
sum += mileage + mileage/2;
else if (classcode == 'Y')
{
if (mileage <= 500)
sum += 500;
else
sum += mileage;
}
}
}

#### POJ 1326 ﻿﻿Mileage Bank

2012-11-24 23:28:50

#### ZOJ 1365 mileage bank

2013-03-04 20:44:10

#### ZOJ 1365 Mileage Bank

2017-06-13 09:55:58

#### Mileage Bank

2013-12-03 09:41:12

#### POJ 1326 Mileage Bank (，四舍五入法)

2013-04-09 22:34:21

#### ZOJ Problem Set - 1365 Mileage Bank

2014-07-28 01:43:07

#### FZU 1116 Mileage Bank

2009-12-22 21:04:00

#### Hoj 1057 Mileage Bank

2013-01-20 17:38:12

#### poj 1326 Mileage Bank

2012-06-01 09:38:55

#### POJ 1326 Mileage Bank

2015-03-02 22:25:29