結果

問題 No.46 はじめのn歩
ユーザー yamax3232yamax3232
提出日時 2017-02-09 20:04:46
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 382 bytes
コンパイル時間 3,281 ms
コンパイル使用メモリ 73,108 KB
実行使用メモリ 57,644 KB
最終ジャッジ日時 2023-08-26 22:38:42
合計ジャッジ時間 5,261 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,996 KB
testcase_01 AC 125 ms
55,680 KB
testcase_02 AC 123 ms
56,820 KB
testcase_03 WA -
testcase_04 AC 123 ms
57,644 KB
testcase_05 WA -
testcase_06 AC 124 ms
56,104 KB
testcase_07 WA -
testcase_08 AC 125 ms
56,064 KB
testcase_09 AC 125 ms
55,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class FirstStep {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
Scanner kb=new Scanner(System.in);
int a=kb.nextInt();
int b=kb.nextInt();
double time=(double)b/(double)a;
if((0.5<=time%2&&time%2<1)||(1.5<=time%2&&time%2<2.0)){
time++;
}
System.out.printf("%d\n", (int)time);
kb.close();

	}

}
0