Skip to content

Instantly share code, notes, and snippets.

@tyama
Created October 24, 2008 15:35
Show Gist options
  • Save tyama/19458 to your computer and use it in GitHub Desktop.
Save tyama/19458 to your computer and use it in GitHub Desktop.
def 数字 = "〇一二三四五六七八九"
def 範囲 = 数字.collect{漢数字->数字.indexOf(漢数字)}
println 範囲.collect{段->
範囲.collect{掛->
(段*掛)!=[].size()?(段*掛).toString().collect{数-> 数字[数.toInteger()]}.join()
.padLeft(数字.indexOf("二")," ")+" ":""
}.join()
}.join("\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment