Submission #122613


Source Code Expand

Copy
import java.util.Scanner

object Main  {
  val MOD = 1000000007;
  def main(args: Array[String]){
    doIt()
  }

  def doIt(){
    val sc = new Scanner(System.in);
    val s = sc.next();
    val t = sc.next();
    var bOK = true;
    for(i <- 0 until s.length()){
      if(s(i) != t(i)){
        if(s(i) == '@'){
          t(i) match {
            case 'a' | 't' | 'c' | 'o' | 'd' | 'e' | 'r' =>
            case _ =>
              bOK = false;
          }

        }
        else if(t(i) == '@'){
          s(i) match {
            case 'a' | 't' | 'c' | 'o' | 'd' | 'e' | 'r' =>
            case _ =>
              bOK = false;
          }
        }
        else bOK = false;
      }
    }
    if(bOK) println("You can win");
    else println("You will lose");
  }
}

Submission Info

Submission Time
Task A - AtCoder社の給料
User mkiken
Language Scala (2.9.1)
Score 0
Code Size 807 Byte
Status WA
Exec Time 1009 ms
Memory 43160 KB

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
WA × 14
Set Name Test Cases
All 00_sample_01.txt, 00_sample_02.txt, test_100.txt, test_14.txt, test_29.txt, test_4.txt, test_42.txt, test_48.txt, test_54.txt, test_59.txt, test_71.txt, test_72.txt, test_84.txt, test_96.txt
Case Name Status Exec Time Memory
00_sample_01.txt WA 978 ms 42924 KB
00_sample_02.txt WA 941 ms 42904 KB
test_100.txt WA 956 ms 43064 KB
test_14.txt WA 1009 ms 42916 KB
test_29.txt WA 947 ms 43072 KB
test_4.txt WA 941 ms 42964 KB
test_42.txt WA 948 ms 42940 KB
test_48.txt WA 955 ms 42936 KB
test_54.txt WA 955 ms 43016 KB
test_59.txt WA 988 ms 43060 KB
test_71.txt WA 947 ms 42892 KB
test_72.txt WA 953 ms 43160 KB
test_84.txt WA 941 ms 43012 KB
test_96.txt WA 945 ms 43072 KB