Submission #143411


Source Code Expand

Copy
import java.util.Scanner
import java.io.PrintWriter

/**
 * Created by hama_du on 2014/03/15.
 */
object Main extends App {
  val in = new Scanner(System.in)
  val out = new PrintWriter(System.out)

  val ans = in.nextLine().toCharArray.map(c => {
    c match {
      case 'O' => '0'
      case 'D' => '0'
      case 'I' => '1'
      case 'Z' => '2'
      case 'S' => '5'
      case 'B' => '8'
      case c => c
    }
  })
  out.println(String.valueOf(ans))
  out.flush()
}

Submission Info

Submission Time
Task A - お買い物クライシス
User hamadu
Language Scala (2.9.1)
Score 100
Code Size 498 Byte
Status
Exec Time 1928 ms
Memory 43192 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 1928 ms 43072 KB
char_1.txt 1259 ms 43140 KB
char_2.txt 1222 ms 43036 KB
char_3.txt 1225 ms 43064 KB
char_4.txt 1220 ms 43072 KB
char_5.txt 1211 ms 42936 KB
char_6.txt 1214 ms 43064 KB
char_7.txt 1247 ms 43116 KB
char_8.txt 1222 ms 43076 KB
char_9.txt 1226 ms 43024 KB
char_B.txt 1180 ms 43096 KB
char_D.txt 1215 ms 43140 KB
char_I.txt 1236 ms 42948 KB
char_O.txt 1189 ms 43016 KB
char_S.txt 1220 ms 43020 KB
char_Z.txt 1202 ms 43076 KB
chars_1.txt 1171 ms 43064 KB
chars_2.txt 1216 ms 43192 KB
chars_3.txt 1209 ms 43064 KB
chars_4.txt 1225 ms 43060 KB
chars_5.txt 1266 ms 43168 KB
hand_1.txt 1228 ms 43016 KB
hand_2.txt 1216 ms 43096 KB
hand_3.txt 1266 ms 43092 KB
hand_4.txt 1241 ms 43068 KB
hand_5.txt 1237 ms 43020 KB
num_1.txt 1256 ms 43012 KB
num_2.txt 1217 ms 43060 KB
num_3.txt 1210 ms 43076 KB
random_1.txt 1206 ms 43140 KB
random_10.txt 1199 ms 43024 KB
random_2.txt 1067 ms 43068 KB
random_3.txt 1106 ms 43016 KB
random_4.txt 1111 ms 43076 KB
random_5.txt 1226 ms 42988 KB
random_6.txt 1225 ms 43076 KB
random_7.txt 1210 ms 42960 KB
random_8.txt 1194 ms 43024 KB
random_9.txt 1231 ms 43056 KB
sample_1.txt 1173 ms 43068 KB
sample_2.txt 1226 ms 43064 KB
sample_3.txt 1226 ms 43024 KB