結果

問題 No.51 やる気の問題
ユーザー papipenpapipen
提出日時 2017-04-06 21:39:59
言語 Java
(openjdk 23)
結果
RE  
実行時間 -
コード長 273 bytes
コンパイル時間 1,745 ms
コンパイル使用メモリ 74,144 KB
実行使用メモリ 54,436 KB
最終ジャッジ日時 2024-07-17 21:40:08
合計ジャッジ時間 5,238 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 RE * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
class N051{
	public static void main(String args[]){
		Scanner s = new Scanner(System.in);
		int w = s.nextInt();
		int d = s.nextInt();
		int a = d - 1;
		for(int i = 0; i < a; i++){
			w -= w / (d * d);
			d--;
		}
		System.out.println(w);
	}
}
0