Saturday, July 16, 2016

UVA 12555 Solution

Unknown
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
using namespace std;

int main() {
    string s;
    int tc, a, b, c= 1;

    cin >> tc;
    while (tc--) {
        cin >> a >> s;
        b = s.length() > 3 ? (int) s[3] - '0' : 0;
        cout << "Case " << c++ << ": " << a * 0.5 + b * 0.05 << endl;
    }
    return 0;
}

Unknown

Studying at Shahjalal University of Science and Technology, Sylhet.

0 comments:

Post a Comment

Coprights @ 2016,