[백준] Archivist (20232)(kotlin)

문제 설명

백준 20232번 문제 링크

입력 및 출력

» 입력

The only line of input contains a single integer y ( 1995≤y≤2019 ), denoting the year. You don’t need to process year numbers less than 1995 or greater than 2019 , or incorrect year formats. It is guaranteed that you will be given a number between 1995 and 2019 , inclusive.

» 출력

Print the winner of the contest in year y exactly in the same format as in the list above.

예제 입출력

입력 출력
2006 PetrSU, ITMO
2019 ITMO
2018 SPbSU
2003 ITMO

문제 풀이1

import java.util.Scanner

fun main(args: Array<String>) = with(Scanner(System.`in`)){
    val map = mutableMapOf<String, String>()

    map.put("1995", "ITMO")
    map.put("1996", "SPbSU")
    map.put("1997", "SPbSU")
    map.put("1998", "ITMO")
    map.put("1999", "ITMO")
    map.put("2000", "SPbSU")
    map.put("2001", "ITMO")
    map.put("2002", "ITMO")
    map.put("2003", "ITMO")
    map.put("2004", "ITMO")
    map.put("2005", "ITMO")
    map.put("2006", "PetrSU, ITMO")
    map.put("2007", "SPbSU")
    map.put("2008", "SPbSU")
    map.put("2009", "ITMO")
    map.put("2010", "ITMO")
    map.put("2011", "ITMO")
    map.put("2012", "ITMO")
    map.put("2013", "SPbSU")
    map.put("2014", "ITMO")
    map.put("2015", "ITMO")
    map.put("2016", "ITMO")
    map.put("2017", "ITMO")
    map.put("2018", "SPbSU")
    map.put("2019", "ITMO")

    println(map[next()])
}