結果

問題 No.46 はじめのn歩
ユーザー yamax3232yamax3232
提出日時 2017-02-09 20:07:25
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 409 bytes
コンパイル時間 3,985 ms
コンパイル使用メモリ 72,128 KB
実行使用メモリ 56,352 KB
最終ジャッジ日時 2023-08-26 22:39:14
合計ジャッジ時間 5,676 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 122 ms
55,664 KB
testcase_02 WA -
testcase_03 AC 122 ms
55,988 KB
testcase_04 AC 122 ms
55,852 KB
testcase_05 AC 125 ms
55,548 KB
testcase_06 WA -
testcase_07 AC 129 ms
55,608 KB
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

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++;
}
else if(time>0){
time++;
}
System.out.printf("%d\n", (int)time);
kb.close();

	}

}
0