結果
問題 |
No.207 世界のなんとか
|
ユーザー |
|
提出日時 | 2020-08-12 16:50:01 |
言語 | Scala(Beta) (3.6.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 429 bytes |
コンパイル時間 | 13,220 ms |
コンパイル使用メモリ | 260,992 KB |
実行使用メモリ | 65,232 KB |
最終ジャッジ日時 | 2024-10-09 18:29:12 |
合計ジャッジ時間 | 31,512 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 WA * 4 |
ソースコード
import scala.io.StdIn.readLine object Nabeatsu { def divisibleByThree = (_: Int) % 3 == 0 def containsThree(x: Int): Boolean = x match { case x if x > 10 => x % 10 == 3 || containsThree(x / 10) case _ => false } def main(args: Array[String]): Unit = { val arr = readLine().split(" ").map(_.toInt) (arr(0) to arr(1)).filter(v => divisibleByThree(v) || containsThree(v)).foreach(System.out.println) } }