結果

問題 No.207 世界のなんとか
コンテスト
ユーザー negistel
提出日時 2016-04-17 18:53:03
言語 Scala(Beta)
(3.8.1)
コンパイル:
scalac _filename_
実行:
java -cp .:/home/linuxbrew/.linuxbrew/Cellar/scala/3.8.1/libexec/maven2/org/scala-lang/scala3-library_3/3.8.1/scala3-library_3-3.8.1.jar:/home/linuxbrew/.linuxbrew/Cellar/scala/3.8.1/libexec/maven2/org/scala-lang/scala-library/3.8.1/scala-library-3.8.1.jar _class_
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 259 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 6,470 ms
コンパイル使用メモリ 224,924 KB
最終ジャッジ日時 2026-03-09 14:41:09
合計ジャッジ時間 12,198 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
-- [E006] Not Found Error: Main.scala:3:26 -------------------------------------
3 |        val Array(a, b) = readLine().split(' ').map(_.toInt)
  |                          ^^^^^^^^
  |                          Not found: readLine
  |
  | longer explanation available when compiling with `-explain`
-- Warning: Main.scala:4:19 ----------------------------------------------------
4 |        for(i <- a to b){
  |                   ^^
  |Alphanumeric method to is not declared infix; it should not be used as infix operator.
  |Instead, use method syntax .to(...) or backticked identifier `to`.
  |The latter can be rewritten automatically under -rewrite -source 3.4-migration.
1 warning found
1 error found

ソースコード

diff #
raw source code

object Main {
    def main(args: Array[String]): Unit = {
        val Array(a, b) = readLine().split(' ').map(_.toInt)
        for(i <- a to b){
            if(i % 3 == 0 || i.toString.contains('3')){
                println(i)
            }
        }
    }
}
0