結果

問題 No.858 わり算
ユーザー keymoon
提出日時 2020-02-05 16:31:16
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 36 ms / 2,000 ms
コード長 867 bytes
コンパイル時間 3,946 ms
コンパイル使用メモリ 115,484 KB
実行使用メモリ 28,256 KB
最終ジャッジ日時 2025-01-07 14:53:29
合計ジャッジ時間 5,226 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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.

ソースコード

diff #

using System;
using System.IO;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Numerics;
using System.Diagnostics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;
using MethodImplOptions = System.Runtime.CompilerServices.MethodImplOptions;
using MethodImplAttribute = System.Runtime.CompilerServices.MethodImplAttribute;

static class P
{
    static void Main()
    {
        var ab = Console.ReadLine().Split().Select(int.Parse).ToArray();
        var res = (ab[0] * BigInteger.Parse("100000000000000000000000000000000000000000000000000") / ab[1]).ToString();
        if (res.Length <= 50) res = "0." + res.PadLeft(50, '0');
        else res = res.Substring(0, res.Length - 50) + "." + res.Substring(res.Length - 50);
        Console.WriteLine(res);
    }
}
0