結果

問題 No.858 わり算
ユーザー bluemeganebluemegane
提出日時 2021-04-18 20:32:11
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 652 bytes
コンパイル時間 796 ms
コンパイル使用メモリ 65,448 KB
実行使用メモリ 22,964 KB
最終ジャッジ日時 2023-09-17 08:05:22
合計ジャッジ時間 2,165 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
20,832 KB
testcase_01 AC 66 ms
20,872 KB
testcase_02 AC 66 ms
21,000 KB
testcase_03 AC 66 ms
22,940 KB
testcase_04 AC 66 ms
22,792 KB
testcase_05 WA -
testcase_06 AC 66 ms
20,860 KB
testcase_07 WA -
testcase_08 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

using System.Numerics;
using System;

public class Hello
{
    public static BigInteger k = 10000000000;
    static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        var a = BigInteger.Parse(line[0]);
        var b = BigInteger.Parse(line[1]);
        getAns(a, b);
   }
    static void getAns (BigInteger a, BigInteger b)
    {
        BigInteger k5 = k * k * k * k * k;
        var c = (a / b).ToString() + ".";
        BigInteger d = (a % b) *k5 / b;
        var ds = d.ToString();
        var L = 50 - ds.Length;
        var ans = c + d.ToString() + new string('0', L);
        Console.WriteLine(ans);
    }
}
0