結果
問題 |
No.858 わり算
|
ユーザー |
![]() |
提出日時 | 2019-11-11 13:59:00 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 127 ms / 2,000 ms |
コード長 | 396 bytes |
コンパイル時間 | 2,215 ms |
コンパイル使用メモリ | 76,776 KB |
実行使用メモリ | 54,528 KB |
最終ジャッジ日時 | 2025-01-07 14:52:39 |
合計ジャッジ時間 | 4,269 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
ソースコード
import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); long a = sc.nextLong(); long b = sc.nextLong(); StringBuilder sb = new StringBuilder(); sb.append(a / b).append("."); long mod = a % b; for (int i = 0; i < 50; i++) { mod *= 10; sb.append(mod / b); mod %= b; } System.out.println(sb); } }