結果
問題 | No.207 世界のなんとか |
ユーザー |
|
提出日時 | 2020-08-12 16:52:27 |
言語 | Scala(Beta) (3.6.2) |
結果 |
AC
|
実行時間 | 903 ms / 5,000 ms |
コード長 | 448 bytes |
コンパイル時間 | 9,349 ms |
コンパイル使用メモリ | 264,600 KB |
実行使用メモリ | 63,356 KB |
最終ジャッジ日時 | 2024-10-09 18:29:57 |
合計ジャッジ時間 | 27,339 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
import scala.io.StdIn.readLineobject Nabeatsu {def divisibleByThree = (_: Int) % 3 == 0def containsThree(x: Int): Boolean = x match {case x if x > 10 => x % 10 == 3 || containsThree(x / 10)case 3 => truecase _ => 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)}}