結果
問題 |
No.858 わり算
|
ユーザー |
![]() |
提出日時 | 2021-04-18 22:49:34 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 31 ms / 2,000 ms |
コード長 | 649 bytes |
コンパイル時間 | 1,896 ms |
コンパイル使用メモリ | 113,232 KB |
実行使用メモリ | 26,720 KB |
最終ジャッジ日時 | 2025-01-07 14:55:51 |
合計ジャッジ時間 | 2,077 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System.Collections.Generic; using System; public class Hello { static void Main() { string[] line = Console.ReadLine().Trim().Split(' '); var a = long.Parse(line[0]); var b = long.Parse(line[1]); getAns(a, b); } static void getAns(long a, long b) { var t = a / b; a %= b; var ans = new List<long>(); for (int i = 0; i < 50; i++) { a *= 10; var w = a / b; ans.Add(w); a -= (w) * b; } Console.Write(t); Console.Write("."); Console.WriteLine(string.Join("", ans)); } }