結果

問題 No.51 やる気の問題
ユーザー Tsukasa_Type
提出日時 2018-02-13 18:08:21
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 381 bytes
コンパイル時間 2,327 ms
コンパイル使用メモリ 74,404 KB
実行使用メモリ 65,400 KB
最終ジャッジ日時 2024-11-30 01:16:13
合計ジャッジ時間 10,393 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other WA * 14 RE * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int w = sc.nextInt();
		int d = sc.nextInt();
		double a = 0;
		while (true) {
			if (d==1) {break;}
			else {
				a = Math.floor(w/(d*d));
				w -= (int)a;
				System.out.println(w);
				d--;
			}
		}
		System.out.println(w);
	}
}
0