結果

問題 No.477 MVP
ユーザー happy-beanshappy-beans
提出日時 2017-03-14 22:10:46
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 274 bytes
コンパイル時間 3,683 ms
コンパイル使用メモリ 71,596 KB
実行使用メモリ 56,328 KB
最終ジャッジ日時 2023-09-12 12:23:22
合計ジャッジ時間 6,230 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,860 KB
testcase_01 AC 123 ms
55,800 KB
testcase_02 WA -
testcase_03 AC 123 ms
55,808 KB
testcase_04 AC 124 ms
55,740 KB
testcase_05 AC 124 ms
55,736 KB
testcase_06 AC 123 ms
56,328 KB
testcase_07 AC 123 ms
55,540 KB
testcase_08 AC 123 ms
56,004 KB
testcase_09 AC 124 ms
56,044 KB
testcase_10 AC 123 ms
55,828 KB
testcase_11 AC 123 ms
55,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No477 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		
		long n = s.nextLong();
		long k = s.nextLong();
		
		long m = n % k;
		long ans = (n - m) / (k + 1) + 1;
		
		System.out.println(ans);
	}
}
0