結果

問題 No.51 やる気の問題
ユーザー itezpace
提出日時 2016-08-21 11:27:55
言語 Java
(openjdk 23)
結果
RE  
実行時間 -
コード長 273 bytes
コンパイル時間 4,018 ms
コンパイル使用メモリ 83,304 KB
実行使用メモリ 41,728 KB
最終ジャッジ日時 2024-11-07 22:23:19
合計ジャッジ時間 8,049 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 RE * 6
権限があれば一括ダウンロードができます

ソースコード

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