-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✅ 15:15 〜 第2回 ひどいコード選手権 #19
Comments
DIscordでやりたい人を募集して、午後にひどいコードの投票と表彰式を行う。 |
ひどいコードができたら、Discord の「#第2回-ひどいコード選手権」まで! https://discord.com/channels/934288800560054292/954919131860320306 |
omiendさん |
aoinoさん |
omiendさん |
taketoraさん |
優勝はAlyさん val composites = "^(#{2,}?)\\1+$".r
def factors(i: Int): List[Int] = {
"#".repeat(i) match {
case composites(factor) =>
factor.length :: factors(i / factor.length)
case _ =>
i :: Nil
}
}
(2 to 100).foreach { n =>
println(s"$n = ${factors(n).mkString(" × ")}")
} |
第2回 ひどいScalaコード選手権
これはひどい!となるコードを書きましょう
前回: scalamatsuri/2020.unconference#16
The text was updated successfully, but these errors were encountered: