結果
| 問題 |
No.858 わり算
|
| コンテスト | |
| ユーザー |
bluemegane
|
| 提出日時 | 2021-04-18 20:32:11 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 652 bytes |
| コンパイル時間 | 830 ms |
| コンパイル使用メモリ | 109,216 KB |
| 実行使用メモリ | 26,628 KB |
| 最終ジャッジ日時 | 2024-07-04 04:51:19 |
| 合計ジャッジ時間 | 1,633 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 4 WA * 3 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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);
}
}
bluemegane