結果

問題 No.51 やる気の問題
ユーザー fukuseifukusei
提出日時 2017-05-17 16:42:07
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 275 bytes
コンパイル時間 3,891 ms
コンパイル使用メモリ 78,448 KB
実行使用メモリ 57,692 KB
最終ジャッジ日時 2023-10-17 23:56:15
合計ジャッジ時間 7,586 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
57,432 KB
testcase_01 AC 131 ms
57,564 KB
testcase_02 AC 129 ms
57,544 KB
testcase_03 AC 129 ms
57,460 KB
testcase_04 AC 128 ms
57,180 KB
testcase_05 RE -
testcase_06 AC 130 ms
57,512 KB
testcase_07 AC 127 ms
57,208 KB
testcase_08 AC 132 ms
57,476 KB
testcase_09 RE -
testcase_10 AC 131 ms
57,616 KB
testcase_11 AC 129 ms
57,544 KB
testcase_12 AC 134 ms
57,428 KB
testcase_13 AC 134 ms
57,424 KB
testcase_14 AC 130 ms
57,404 KB
testcase_15 RE -
testcase_16 AC 138 ms
57,528 KB
testcase_17 AC 129 ms
57,540 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 131 ms
57,416 KB
testcase_21 AC 131 ms
57,480 KB
testcase_22 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*; 

public class test {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int a = sc.nextInt();
		int b = sc.nextInt();

		if(b != 1){
			for(int i=b; i>1; i--){
				a -= a / (i * i);
			}
		}
		System.out.println(a);
	}
}
0