結果

問題 No.477 MVP
ユーザー history_Basshistory_Bass
提出日時 2017-02-25 13:48:01
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 1,000 ms
コード長 484 bytes
コンパイル時間 2,060 ms
コンパイル使用メモリ 72,144 KB
実行使用メモリ 55,980 KB
最終ジャッジ日時 2023-09-02 08:03:15
合計ジャッジ時間 4,407 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,724 KB
testcase_01 AC 119 ms
55,672 KB
testcase_02 AC 120 ms
55,884 KB
testcase_03 AC 122 ms
55,736 KB
testcase_04 AC 122 ms
55,804 KB
testcase_05 AC 133 ms
55,676 KB
testcase_06 AC 120 ms
55,412 KB
testcase_07 AC 126 ms
55,724 KB
testcase_08 AC 125 ms
55,804 KB
testcase_09 AC 124 ms
55,728 KB
testcase_10 AC 124 ms
55,768 KB
testcase_11 AC 123 ms
55,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class mvp {
	public static void main(String args[]){
		long N=100,K=2,answer=0;
		
		//文字の読み込み
		Scanner sc=new Scanner(System.in);
		String line=sc.nextLine();
		String[] NandK=line.split(" ",0);
		//文字を分割して型変換
		long[] j=new long[2];
		j[0]=Long.parseLong(NandK[0]);
		j[1]=Long.parseLong(NandK[1]);
		//文字の代入
		N=j[0];
		K=j[1];
		
		//回答の計算
		answer=N/(K+1)+1;
		
		System.out.println(answer);
	}
}
0