結果

問題 No.477 MVP
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2017-01-27 23:55:34
言語 Java19
(openjdk 21)
結果
WA  
実行時間 -
コード長 369 bytes
コンパイル時間 2,915 ms
コンパイル使用メモリ 71,020 KB
実行使用メモリ 56,080 KB
最終ジャッジ日時 2023-08-25 11:09:55
合計ジャッジ時間 4,455 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
56,028 KB
testcase_01 AC 119 ms
53,724 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 121 ms
56,080 KB
testcase_05 WA -
testcase_06 AC 120 ms
55,772 KB
testcase_07 AC 117 ms
54,716 KB
testcase_08 AC 117 ms
55,800 KB
testcase_09 AC 120 ms
56,036 KB
testcase_10 AC 120 ms
55,500 KB
testcase_11 AC 126 ms
55,504 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;
        }
        System.out.println(ans);
    }
}
0