結果

問題 No.1902 AC Ratio
ユーザー eagleeagle
提出日時 2022-05-28 13:42:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 378 bytes
コンパイル時間 2,267 ms
コンパイル使用メモリ 74,416 KB
実行使用メモリ 57,848 KB
最終ジャッジ日時 2023-10-20 23:04:14
合計ジャッジ時間 5,136 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
57,480 KB
testcase_01 AC 116 ms
55,384 KB
testcase_02 AC 114 ms
57,232 KB
testcase_03 AC 120 ms
57,848 KB
testcase_04 AC 117 ms
57,472 KB
testcase_05 AC 125 ms
57,268 KB
testcase_06 AC 119 ms
57,244 KB
testcase_07 AC 118 ms
57,416 KB
testcase_08 AC 115 ms
57,152 KB
testcase_09 AC 116 ms
57,416 KB
testcase_10 AC 118 ms
57,496 KB
testcase_11 AC 118 ms
57,636 KB
testcase_12 AC 114 ms
57,148 KB
testcase_13 AC 116 ms
57,400 KB
testcase_14 AC 126 ms
57,204 KB
testcase_15 AC 118 ms
57,600 KB
testcase_16 AC 115 ms
57,612 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String[] values = S.split("/");
		int A = Integer.parseInt(values[0]);
		int B = Integer.parseInt(values[1]);
		float f = (float)A / (float)B;
		System.out.println(f);
	}
}
0