結果

問題 No.51 やる気の問題
ユーザー mits58mits58
提出日時 2016-05-14 13:55:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 141 ms / 5,000 ms
コード長 423 bytes
コンパイル時間 2,240 ms
コンパイル使用メモリ 74,232 KB
実行使用メモリ 54,596 KB
最終ジャッジ日時 2024-04-15 21:25:32
合計ジャッジ時間 6,354 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
53,796 KB
testcase_01 AC 134 ms
53,904 KB
testcase_02 AC 136 ms
53,864 KB
testcase_03 AC 133 ms
54,596 KB
testcase_04 AC 136 ms
54,044 KB
testcase_05 AC 137 ms
54,184 KB
testcase_06 AC 137 ms
54,108 KB
testcase_07 AC 136 ms
54,320 KB
testcase_08 AC 133 ms
53,956 KB
testcase_09 AC 140 ms
53,832 KB
testcase_10 AC 135 ms
54,324 KB
testcase_11 AC 132 ms
54,300 KB
testcase_12 AC 134 ms
54,404 KB
testcase_13 AC 140 ms
54,360 KB
testcase_14 AC 136 ms
54,340 KB
testcase_15 AC 137 ms
54,148 KB
testcase_16 AC 137 ms
53,788 KB
testcase_17 AC 135 ms
53,744 KB
testcase_18 AC 140 ms
54,180 KB
testcase_19 AC 141 ms
54,216 KB
testcase_20 AC 134 ms
53,904 KB
testcase_21 AC 133 ms
54,372 KB
testcase_22 AC 139 ms
54,204 KB
権限があれば一括ダウンロードができます

ソースコード

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()){
        	long w=sc.nextInt();
        	long d=sc.nextInt();
        	while(true){
        		long work=w/(d*d);
        		if(w-work<=0){ System.out.println(work); break;}
        		w-=work;
        		d--;
        	}
        }
    }
}
0