結果

問題 No.858 わり算
ユーザー shinwisteriashinwisteria
提出日時 2019-08-30 11:18:40
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 414 bytes
コンパイル時間 3,537 ms
コンパイル使用メモリ 74,896 KB
実行使用メモリ 54,404 KB
最終ジャッジ日時 2024-04-30 21:35:01
合計ジャッジ時間 5,566 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
54,272 KB
testcase_01 AC 139 ms
54,404 KB
testcase_02 AC 138 ms
54,312 KB
testcase_03 AC 138 ms
53,856 KB
testcase_04 AC 139 ms
54,176 KB
testcase_05 WA -
testcase_06 AC 140 ms
54,356 KB
testcase_07 AC 142 ms
54,132 KB
testcase_08 AC 141 ms
54,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package con_level_1half;
import java.util.Scanner;

public class Con858 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int A = s.nextInt() , B = s.nextInt();
		s.close();

		StringBuilder stb = new StringBuilder();
		stb.append(A/B);
		stb.append(".");
		int r = A%B * 10;
		for(int i = 0;i < 50;i++){
			stb.append(r/B);
			r = r%B * 10;
		}
		System.out.println(stb);
	}

}
0