DWITE '09 R1 #4 - My First True Letter

View as PDF

Submit solution

Points: 4
Time limit: 2.0s
Memory limit: 64M

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig
DWITE Online Computer Programming Contest, October 2009, Problem 4

There are a lot of letters that come and go, but it's those unique letters that really stand out. And not just any unique letter, but the very first one of such. This is what we want to find in a word.

The input will contain 5 lines, each a single word of capital letters, at least 1 and no more than 255 characters long.

The output will contain 5 lines, each a single letter -- the first letter (left-most) from a word, that is unique to that word.

It is guaranteed for such letter to exist.

Sample Input


Sample Output


Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) Problem Resource: DWITE


  • 0
    sankeeth_ganeswaran  commented on April 4, 2019, 11:03 a.m.

    Can someone take a look at my code? I can't seem to find what's wrong with it.

    • -1
      14CF208B  commented on April 4, 2019, 1:27 p.m.

      I don't think you understand the problem.

  • 0
    sankeeth_ganeswaran  commented on Jan. 6, 2019, 12:38 p.m.

    shouldn't the sample input contain 5 lines? or did i misunderstand....

    • 1
      Rimuru  commented on Jan. 6, 2019, 12:54 p.m.

      DWITE does not provide full cases for sample. The actual data will contain 5 lines, but the sample will not.