結果

問題 No.51 やる気の問題
ユーザー mits58mits58
提出日時 2016-05-14 13:51:41
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 420 bytes
コンパイル時間 2,448 ms
コンパイル使用メモリ 74,408 KB
実行使用メモリ 54,564 KB
最終ジャッジ日時 2024-04-15 21:24:29
合計ジャッジ時間 5,766 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 100 ms
39,856 KB
testcase_01 AC 119 ms
41,320 KB
testcase_02 AC 115 ms
41,088 KB
testcase_03 AC 112 ms
41,096 KB
testcase_04 AC 111 ms
41,280 KB
testcase_05 RE -
testcase_06 AC 120 ms
41,164 KB
testcase_07 AC 115 ms
40,932 KB
testcase_08 AC 119 ms
41,216 KB
testcase_09 RE -
testcase_10 AC 116 ms
41,548 KB
testcase_11 AC 116 ms
41,264 KB
testcase_12 AC 117 ms
41,048 KB
testcase_13 AC 117 ms
41,420 KB
testcase_14 AC 116 ms
41,332 KB
testcase_15 RE -
testcase_16 AC 119 ms
41,460 KB
testcase_17 AC 117 ms
41,244 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 123 ms
41,708 KB
testcase_21 AC 117 ms
41,480 KB
testcase_22 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
	static long mod=(long)10E9;
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        while(sc.hasNext()){
        	int w=sc.nextInt();
        	int d=sc.nextInt();
        	while(true){
        		int work=w/(d*d);
        		if(w-work<=0){ System.out.println(work); break;}
        		w-=work;
        		d--;
        	}
        }
    }
}
0