Submission #143339


Source Code Expand

Copy
#include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <string>
#include <bitset>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <sstream>
#include <fstream>
#include <tuple>
#include <set>
#include <string.h>

#define X first
#define Y second
#define MP make_pair
#define MT make_tuple
#define FOR(i, n) for(int (i) = 0; (i) < (n); (i)++)
typedef long long ll;
using namespace std;
const int MAX = 101;

template<class T, class U>
void convert(T &t, U &u){
	stringstream ss;
	ss << t;
	ss >> u;
}

int main(){
	string n;
	cin >> n;

	FOR(i, n.size()){
		if (n[i] == 'O') n[i] = '0';
		if (n[i] == 'D') n[i] = '0';
		if (n[i] == 'I') n[i] = '1';
		if (n[i] == 'Z') n[i] = '2';
		if (n[i] == 'S') n[i] = '5';
		if (n[i] == 'B') n[i] = '8';
	}

	cout << n << endl;
	return 0;
}

Submission Info

Submission Time
Task A - お買い物クライシス
User keny30827
Language C++11 (GCC 4.8.1)
Score 100
Code Size 901 Byte
Status
Exec Time 27 ms
Memory 932 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 20 ms 796 KB
char_1.txt 21 ms 928 KB
char_2.txt 21 ms 928 KB
char_3.txt 20 ms 928 KB
char_4.txt 21 ms 932 KB
char_5.txt 20 ms 932 KB
char_6.txt 20 ms 800 KB
char_7.txt 21 ms 932 KB
char_8.txt 20 ms 804 KB
char_9.txt 21 ms 800 KB
char_B.txt 20 ms 928 KB
char_D.txt 20 ms 800 KB
char_I.txt 20 ms 804 KB
char_O.txt 20 ms 812 KB
char_S.txt 21 ms 920 KB
char_Z.txt 21 ms 932 KB
chars_1.txt 21 ms 932 KB
chars_2.txt 21 ms 924 KB
chars_3.txt 20 ms 800 KB
chars_4.txt 20 ms 800 KB
chars_5.txt 20 ms 800 KB
hand_1.txt 21 ms 812 KB
hand_2.txt 21 ms 800 KB
hand_3.txt 21 ms 928 KB
hand_4.txt 21 ms 804 KB
hand_5.txt 20 ms 800 KB
num_1.txt 19 ms 796 KB
num_2.txt 19 ms 920 KB
num_3.txt 20 ms 796 KB
random_1.txt 21 ms 920 KB
random_10.txt 20 ms 808 KB
random_2.txt 21 ms 928 KB
random_3.txt 20 ms 800 KB
random_4.txt 21 ms 804 KB
random_5.txt 21 ms 928 KB
random_6.txt 20 ms 800 KB
random_7.txt 21 ms 804 KB
random_8.txt 21 ms 796 KB
random_9.txt 27 ms 736 KB
sample_1.txt 19 ms 800 KB
sample_2.txt 20 ms 800 KB
sample_3.txt 21 ms 676 KB