結果

問題 No.51 やる気の問題
ユーザー kaiyori_labkaiyori_lab
提出日時 2014-11-11 05:24:14
言語 Scala(Beta)
(3.4.0)
結果
RE  
実行時間 -
コード長 251 bytes
コンパイル時間 8,204 ms
コンパイル使用メモリ 243,124 KB
実行使用メモリ 63,272 KB
最終ジャッジ日時 2023-09-11 07:23:55
合計ジャッジ時間 33,327 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 975 ms
62,876 KB
testcase_01 AC 990 ms
62,832 KB
testcase_02 AC 996 ms
62,964 KB
testcase_03 AC 976 ms
62,684 KB
testcase_04 AC 962 ms
63,272 KB
testcase_05 RE -
testcase_06 AC 985 ms
62,904 KB
testcase_07 AC 987 ms
62,788 KB
testcase_08 AC 1,006 ms
63,088 KB
testcase_09 RE -
testcase_10 AC 985 ms
62,740 KB
testcase_11 AC 971 ms
62,716 KB
testcase_12 AC 978 ms
62,928 KB
testcase_13 AC 967 ms
62,720 KB
testcase_14 AC 980 ms
62,932 KB
testcase_15 RE -
testcase_16 AC 998 ms
62,888 KB
testcase_17 AC 981 ms
62,704 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 975 ms
62,712 KB
testcase_21 AC 955 ms
62,936 KB
testcase_22 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

object Main extends App{
    val sc = new java.util.Scanner(System.in)
    def work(w: Int, d: Int): Unit = d match{
        case 1 => println(w)
        case _ => work(w - (w / (d * d)).toInt, d - 1)
    }
    work(sc.nextInt, sc.nextInt)   
}
0