結果

問題 No.51 やる気の問題
ユーザー fukusei
提出日時 2017-05-23 00:31:20
言語 Java
(openjdk 23)
結果
AC  
実行時間 125 ms / 5,000 ms
コード長 272 bytes
コンパイル時間 1,923 ms
コンパイル使用メモリ 73,952 KB
実行使用メモリ 54,272 KB
最終ジャッジ日時 2024-09-19 10:29:02
合計ジャッジ時間 5,350 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
class test{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int W = sc.nextInt();
		long D = sc.nextInt();
		
		if(D != 1){
			for(long i=D; i>1; i--){
				W -= W / (i * i);
				
			}
		}
		System.out.println(W);
	}
}
0