結果

問題 No.388 階段 (1)
ユーザー yamax3232yamax3232
提出日時 2017-02-09 20:31:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 355 bytes
コンパイル時間 3,355 ms
コンパイル使用メモリ 71,648 KB
実行使用メモリ 56,304 KB
最終ジャッジ日時 2023-08-26 22:39:52
合計ジャッジ時間 6,255 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
55,880 KB
testcase_01 AC 121 ms
55,312 KB
testcase_02 AC 115 ms
55,548 KB
testcase_03 AC 115 ms
56,304 KB
testcase_04 AC 118 ms
55,612 KB
testcase_05 AC 118 ms
56,000 KB
testcase_06 AC 118 ms
55,516 KB
testcase_07 AC 114 ms
55,960 KB
testcase_08 AC 115 ms
55,532 KB
testcase_09 AC 115 ms
55,536 KB
testcase_10 AC 117 ms
55,848 KB
testcase_11 AC 114 ms
55,320 KB
testcase_12 AC 118 ms
55,804 KB
testcase_13 AC 115 ms
55,556 KB
testcase_14 AC 115 ms
55,488 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Stares1 {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
Scanner kb=new Scanner(System.in);
int a=kb.nextInt();
int b=kb.nextInt();
double time=1+(double)a/(double)b;
if(!(a!=0||a<b)&&b%a>0){
	time++;
}


System.out.printf("%d\n", (int) time);
kb.close();

	}

}
0