結果

問題 No.51 やる気の問題
ユーザー Mcpu3
提出日時 2018-06-23 16:49:17
言語 Java
(openjdk 23)
結果
AC  
実行時間 137 ms / 5,000 ms
コード長 248 bytes
コンパイル時間 2,109 ms
コンパイル使用メモリ 74,244 KB
実行使用メモリ 54,408 KB
最終ジャッジ日時 2024-06-30 18:28:43
合計ジャッジ時間 6,131 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class no51{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		long d,w,i;
		w=stdIn.nextLong();
		d=stdIn.nextLong();
		for(i=d;i>1;i--) w-=w/(i*i);
		System.out.print(w);
	}
}
0