結果

問題 No.477 MVP
ユーザー happy-beanshappy-beans
提出日時 2017-03-14 22:18:39
言語 Java19
(openjdk 21)
結果
AC  
実行時間 131 ms / 1,000 ms
コード長 318 bytes
コンパイル時間 3,449 ms
コンパイル使用メモリ 71,696 KB
実行使用メモリ 56,200 KB
最終ジャッジ日時 2023-09-12 12:23:28
合計ジャッジ時間 5,844 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
55,948 KB
testcase_01 AC 130 ms
55,776 KB
testcase_02 AC 130 ms
55,808 KB
testcase_03 AC 131 ms
55,992 KB
testcase_04 AC 130 ms
56,148 KB
testcase_05 AC 131 ms
56,000 KB
testcase_06 AC 131 ms
55,556 KB
testcase_07 AC 130 ms
55,804 KB
testcase_08 AC 130 ms
55,580 KB
testcase_09 AC 130 ms
56,200 KB
testcase_10 AC 129 ms
55,768 KB
testcase_11 AC 130 ms
55,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No477 {

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

}
0