結果

問題 No.51 やる気の問題
ユーザー itezpaceitezpace
提出日時 2016-08-21 11:27:55
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 273 bytes
コンパイル時間 4,037 ms
コンパイル使用メモリ 82,976 KB
実行使用メモリ 41,684 KB
最終ジャッジ日時 2024-04-25 11:07:23
合計ジャッジ時間 5,080 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
41,580 KB
testcase_01 AC 108 ms
41,068 KB
testcase_02 AC 104 ms
40,220 KB
testcase_03 AC 117 ms
41,340 KB
testcase_04 AC 116 ms
41,000 KB
testcase_05 RE -
testcase_06 AC 114 ms
41,580 KB
testcase_07 AC 108 ms
41,124 KB
testcase_08 AC 110 ms
41,252 KB
testcase_09 RE -
testcase_10 AC 103 ms
40,292 KB
testcase_11 AC 114 ms
41,064 KB
testcase_12 AC 113 ms
41,248 KB
testcase_13 AC 110 ms
41,256 KB
testcase_14 AC 116 ms
41,044 KB
testcase_15 RE -
testcase_16 AC 110 ms
41,200 KB
testcase_17 AC 101 ms
40,356 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 109 ms
41,276 KB
testcase_21 AC 109 ms
41,344 KB
testcase_22 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Yuki51 {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int w = sc.nextInt();
    int d = sc.nextInt();
    for(int i=d; i>1; --i){
      int a = w/(i*i);
      w-=a;
    }
    System.out.println(w);
  }
}
0