結果

問題 No.661 ハローキティはりんご3個分
ユーザー srup٩(๑`н´๑)۶srup٩(๑`н´๑)۶
提出日時 2018-04-14 21:14:39
言語 Scala(Beta)
(3.4.0)
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 422 bytes
コンパイル時間 5,607 ms
コンパイル使用メモリ 213,972 KB
最終ジャッジ日時 2023-09-12 18:16:17
合計ジャッジ時間 6,025 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
-- Error: Main.scala:6:4 -------------------------------------------------------
6 |  		for (tmp <- (0 to (i - 1))) {
  |  		^
  |  		Incompatible combinations of tabs and spaces in indentation prefixes.
  |  		Previous indent : 2 tabs
  |  		Latest indent   : 2 spaces, 2 tabs
-- Error: Main.scala:9:4 -------------------------------------------------------
9 |  		list = list.reverse;
  |  		^
  |  		Incompatible combinations of tabs and spaces in indentation prefixes.
  |  		Previous indent : 2 tabs
  |  		Latest indent   : 2 spaces, 2 tabs
-- Error: Main.scala:10:4 ------------------------------------------------------
10 |  		list.foreach(x => {
   |  		^
   |   Incompatible combinations of tabs and spaces in indentation prefixes.
   |   Previous indent : 2 tabs
   |   Latest indent   : 2 spaces, 2 tabs
3 errors found

ソースコード

diff #

object Main {

	def main(arg:Array[String]) = {
		val i = scala.io.StdIn.readLine().toInt;
		var list: List[Int] = List();
  		for (tmp <- (0 to (i - 1))) {
  			list = scala.io.StdIn.readLine().toInt :: list;
  		}
  		list = list.reverse;
  		list.foreach(x => {
  			//println("x: " + x);
  			println(if (x % 40 == 0) ("ikisugi") else if (x % 8 == 0) ("iki") else if (x % 10 == 0) ("sugi") else (x / 3));
  		})
	}

}
0