Skip to content

Instantly share code, notes, and snippets.

@narita1980
Created March 27, 2015 06:35
Show Gist options
  • Save narita1980/66467901e0fe3b2ab7dd to your computer and use it in GitHub Desktop.
Save narita1980/66467901e0fe3b2ab7dd to your computer and use it in GitHub Desktop.
言語処理100本ノック 2015_第1章: 準備運動_01. 「パタトクカシーー」
package main
func Substring(s string, i int) string {
runes := []rune(s)
return string(runes[i])
}
func main() {
str := "パタトクカシーー"
println(Substring(str, 1) + Substring(str, 3) + Substring(str, 5) + Substring(str, 7))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment