結果
問題 |
No.858 わり算
|
ユーザー |
![]() |
提出日時 | 2020-08-31 15:20:19 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 424 bytes |
コンパイル時間 | 2,478 ms |
コンパイル使用メモリ | 74,900 KB |
実行使用メモリ | 41,516 KB |
最終ジャッジ日時 | 2024-11-16 00:15:02 |
合計ジャッジ時間 | 4,019 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 6 WA * 1 |
ソースコード
import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); StringBuilder sb = new StringBuilder(); sb.append(a / b).append("."); int mod = a % b; for (int i = 0; i < 50; i++) { sb.append(mod * 10 / b); mod = mod * 10 % b; } System.out.println(sb); } }