結果

問題 No.51 やる気の問題
ユーザー AoiroFukurouAoiroFukurou
提出日時 2016-12-05 13:40:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 137 ms / 5,000 ms
コード長 336 bytes
コンパイル時間 3,296 ms
コンパイル使用メモリ 74,092 KB
実行使用メモリ 41,920 KB
最終ジャッジ日時 2024-05-05 20:21:35
合計ジャッジ時間 7,276 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
41,372 KB
testcase_01 AC 131 ms
41,516 KB
testcase_02 AC 130 ms
41,344 KB
testcase_03 AC 132 ms
41,088 KB
testcase_04 AC 132 ms
41,136 KB
testcase_05 AC 136 ms
41,344 KB
testcase_06 AC 134 ms
41,920 KB
testcase_07 AC 134 ms
41,616 KB
testcase_08 AC 133 ms
41,260 KB
testcase_09 AC 136 ms
41,468 KB
testcase_10 AC 132 ms
41,084 KB
testcase_11 AC 132 ms
41,696 KB
testcase_12 AC 132 ms
41,368 KB
testcase_13 AC 135 ms
41,344 KB
testcase_14 AC 135 ms
41,352 KB
testcase_15 AC 134 ms
41,108 KB
testcase_16 AC 135 ms
41,560 KB
testcase_17 AC 132 ms
41,688 KB
testcase_18 AC 137 ms
41,664 KB
testcase_19 AC 135 ms
41,552 KB
testcase_20 AC 122 ms
41,364 KB
testcase_21 AC 129 ms
41,268 KB
testcase_22 AC 135 ms
41,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class No_051 {// やる気の問題
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int W = sc.nextInt();
		int D = sc.nextInt();
		sc.close();
		for (int i = D; i > 1; i--) {
			int tmp = W / i  / i;
			W -= tmp;
		}
		System.out.println(W);
	}
}
0