ãã®ã¨ã³ããªã¯Scala Advent Calendar jp 2010 : ATNDã®25æ¥ã®ãã®ã§ãã ã¡ãªã¼ã¯ãªã¹ãã¹! ã¯ãªã¹ãã¹ã¯æ¥½ããã¿ããªã§ããºã«ã解ãã¦éã³ã¾ãããã ããºã«ã¿ãããªæ¢ç´¢åé¡ãScalaã§è§£ãå ´åã¯ããªã¹ãã¢ããã使ãã¨ãã¬ã¤ã«æ¸ãã¾ãã ä¾: SEND+MORE=MONEY ä¾ã¨ãã¦è¦é¢ç®ã解ãã¦ã¿ã¾ãããã åã¢ã«ãã¡ãããã«ç°ãªãæ°åãå²ãå½ã¦ããããã®æ°åã¯ä½ã? ãã ãæä¸ä½æ¡ã0ã§ã¯ãªãã æ®éã«forã«ã¼ãã使ã£ã¦è§£ãã¨ããã¹ãã®æ·±ããé ·ããã¨ã«ãªãã¾ã:)ã // int(1,2,3)ã123ã«ããé¢æ° def int(xs : Int*) : Int = xs.foldLeft(0)( _ * 10 + _) // SEND+MORE=MONEYã®çããæ¢ç´¢ãã def solve : (Int,Int,Int) = { for( s <-
{{#tags}}- {{label}}
{{/tags}}