Submission #143421


Source Code Expand

Copy
#include <iostream>
#include <cstdio>
#include <map>
#include <set>
using namespace std;
const int MAX_N = 105;
//char price[10];
int main(int argc, const char * argv[])
{
    string s;
    cin >> s;
    map<char, char> change;
    for (int i = 0; i < 10; i++) {
        char c = '0' + i;
        change[c] = c;
    }
    change['O'] = '0';
    change['D'] = '0';
    change['I'] = '1';
    change['Z'] = '2';
    change['S'] = '5';
    change['B'] = '8';
    
    for (int i = 0; i < s.size(); i++) {
        s[i] = change[s[i]];
    }
    cout << s << endl;
    return 0;
}

Submission Info

Submission Time
Task A - お買い物クライシス
User koyahi
Language C++ (G++ 4.6.4)
Score 100
Code Size 605 Byte
Status
Exec Time 48 ms
Memory 1056 KB

Test Cases

Set Name Score / Max Score Test Cases
All 100 / 100 char_0.txt, char_1.txt, char_2.txt, char_3.txt, char_4.txt, char_5.txt, char_6.txt, char_7.txt, char_8.txt, char_9.txt, char_B.txt, char_D.txt, char_I.txt, char_O.txt, char_S.txt, char_Z.txt, chars_1.txt, chars_2.txt, chars_3.txt, chars_4.txt, chars_5.txt, hand_1.txt, hand_2.txt, hand_3.txt, hand_4.txt, hand_5.txt, num_1.txt, num_2.txt, num_3.txt, random_1.txt, random_10.txt, random_2.txt, random_3.txt, random_4.txt, random_5.txt, random_6.txt, random_7.txt, random_8.txt, random_9.txt
Case Name Status Exec Time Memory
char_0.txt 38 ms 948 KB
char_1.txt 36 ms 952 KB
char_2.txt 39 ms 956 KB
char_3.txt 31 ms 948 KB
char_4.txt 35 ms 948 KB
char_5.txt 35 ms 952 KB
char_6.txt 38 ms 952 KB
char_7.txt 33 ms 948 KB
char_8.txt 34 ms 952 KB
char_9.txt 32 ms 956 KB
char_B.txt 36 ms 948 KB
char_D.txt 36 ms 948 KB
char_I.txt 46 ms 952 KB
char_O.txt 34 ms 952 KB
char_S.txt 31 ms 948 KB
char_Z.txt 38 ms 948 KB
chars_1.txt 36 ms 952 KB
chars_2.txt 35 ms 952 KB
chars_3.txt 36 ms 948 KB
chars_4.txt 36 ms 960 KB
chars_5.txt 34 ms 948 KB
hand_1.txt 48 ms 948 KB
hand_2.txt 32 ms 952 KB
hand_3.txt 35 ms 940 KB
hand_4.txt 40 ms 1056 KB
hand_5.txt 36 ms 948 KB
num_1.txt 36 ms 952 KB
num_2.txt 42 ms 952 KB
num_3.txt 33 ms 948 KB
random_1.txt 36 ms 956 KB
random_10.txt 44 ms 948 KB
random_2.txt 33 ms 956 KB
random_3.txt 36 ms 948 KB
random_4.txt 39 ms 952 KB
random_5.txt 33 ms 956 KB
random_6.txt 31 ms 952 KB
random_7.txt 37 ms 956 KB
random_8.txt 39 ms 960 KB
random_9.txt 38 ms 956 KB
sample_1.txt 35 ms 968 KB
sample_2.txt 36 ms 956 KB
sample_3.txt 33 ms 948 KB