結果

問題 No.51 やる気の問題
ユーザー kano_town
提出日時 2014-11-19 19:50:44
言語 Java
(openjdk 23)
結果
AC  
実行時間 126 ms / 5,000 ms
コード長 274 bytes
コンパイル時間 3,816 ms
コンパイル使用メモリ 76,368 KB
実行使用メモリ 41,856 KB
最終ジャッジ日時 2025-01-02 19:21:19
合計ジャッジ時間 7,193 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Yukicoder51 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long w = sc.nextLong();
		long d = sc.nextLong();
		
		for (; d > 1; d--) 	w -= w / (d * d);
		System.out.println(w);
	}
}
0