提出 #4719732


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main() {
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);

    int N;
    cin >> N;
    double x;
    string u;
    double sum = 0.0;
    double rate = 380000.0;
    for (int i = 0; i < N; i++) {
        cin >> x >> u;
        if (u == "JPY") {
            sum += x;
        } else {
            sum += (rate * x);
        }
    }

    cout << fixed << sum << "\n";
}

提出情報

提出日時
問題 B - Digital Gifts
ユーザ yopiyama
言語 C++14 (GCC 5.4.1)
得点 200
コード長 482 Byte
結果 AC
実行時間 1 ms
メモリ 256 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 2
AC × 8
セット名 テストケース
Sample a01, a02
All a01, a02, b03, b04, b05, b06, b07, b08
ケース名 結果 実行時間 メモリ
a01 AC 1 ms 256 KiB
a02 AC 1 ms 256 KiB
b03 AC 1 ms 256 KiB
b04 AC 1 ms 256 KiB
b05 AC 1 ms 256 KiB
b06 AC 1 ms 256 KiB
b07 AC 1 ms 256 KiB
b08 AC 1 ms 256 KiB