結果

問題 No.388 階段 (1)
ユーザー TwinkleStar74TwinkleStar74
提出日時 2017-09-10 12:19:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 115 ms / 2,000 ms
コード長 366 bytes
コンパイル時間 3,081 ms
コンパイル使用メモリ 73,836 KB
実行使用メモリ 41,420 KB
最終ジャッジ日時 2024-04-25 02:56:20
合計ジャッジ時間 5,301 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
41,144 KB
testcase_01 AC 111 ms
41,420 KB
testcase_02 AC 102 ms
40,144 KB
testcase_03 AC 103 ms
40,212 KB
testcase_04 AC 105 ms
39,788 KB
testcase_05 AC 115 ms
40,988 KB
testcase_06 AC 110 ms
39,828 KB
testcase_07 AC 98 ms
40,212 KB
testcase_08 AC 100 ms
39,824 KB
testcase_09 AC 98 ms
40,412 KB
testcase_10 AC 103 ms
40,380 KB
testcase_11 AC 113 ms
41,292 KB
testcase_12 AC 107 ms
41,132 KB
testcase_13 AC 102 ms
39,948 KB
testcase_14 AC 110 ms
39,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class No_388 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int S = sc.nextInt();
		int F = sc.nextInt();
		if ( S%F==0 || S>F && S%F>0 ){ //SがFで割り切れる、もしくはS>Fで余りが1以上の時
			System.out.println((S/F)+1);
		}
		else if (F>S){
			System.out.println(1);
		}
	}
}
0