結果

問題 No.477 MVP
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2017-01-27 23:54:04
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 394 bytes
コンパイル時間 1,902 ms
コンパイル使用メモリ 72,036 KB
実行使用メモリ 58,184 KB
最終ジャッジ日時 2023-08-25 11:09:13
合計ジャッジ時間 4,284 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,924 KB
testcase_01 AC 118 ms
56,600 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 123 ms
56,164 KB
testcase_05 WA -
testcase_06 AC 122 ms
56,072 KB
testcase_07 AC 123 ms
56,092 KB
testcase_08 AC 120 ms
56,332 KB
testcase_09 AC 119 ms
58,184 KB
testcase_10 AC 120 ms
55,832 KB
testcase_11 AC 119 ms
56,260 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        long K = sc.nextLong();
        long ans = 0;
        long D = K+1;
        if(N%D==0){
            ans=N/D;
        }else{
            ans=N/D+1;
        }
        if(ans==0)ans=1;
        System.out.println(ans);
    }
}
0