Skip to content

Instantly share code, notes, and snippets.

@hirokazumiyaji
Last active September 20, 2015 12:41
Show Gist options
  • Save hirokazumiyaji/8a012025aa12dc7339b3 to your computer and use it in GitHub Desktop.
Save hirokazumiyaji/8a012025aa12dc7339b3 to your computer and use it in GitHub Desktop.
東京工業大学プログラミングコンテスト2015
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
scanner := bufio.NewScanner(os.Stdin)
scanner.Scan()
input := scanner.Text()
switch input[2] {
case 'B':
fmt.Println("Bachelor", input[0:2])
case 'M':
fmt.Println("Master", input[0:2])
case 'D':
fmt.Println("Doctor", input[0:2])
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment