結果

問題 No.1175 Simultaneous Equations
ユーザー masayoshi361masayoshi361
提出日時 2020-08-21 21:25:43
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 28 ms / 2,000 ms
コード長 795 bytes
コンパイル時間 2,483 ms
コンパイル使用メモリ 112,088 KB
実行使用メモリ 28,048 KB
最終ジャッジ日時 2024-04-23 05:24:05
合計ジャッジ時間 3,368 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
25,732 KB
testcase_01 AC 26 ms
23,604 KB
testcase_02 AC 26 ms
26,012 KB
testcase_03 AC 27 ms
27,792 KB
testcase_04 AC 28 ms
28,040 KB
testcase_05 AC 27 ms
25,776 KB
testcase_06 AC 27 ms
26,012 KB
testcase_07 AC 27 ms
26,016 KB
testcase_08 AC 27 ms
27,796 KB
testcase_09 AC 26 ms
26,128 KB
testcase_10 AC 27 ms
26,012 KB
testcase_11 AC 25 ms
28,048 KB
testcase_12 AC 27 ms
27,800 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;class Program
{
	
	static void Main(string[] args)
	{
        //var exStdIn = new System.IO.StreamReader( "stdin.txt" );System.Console.SetIn( exStdIn );
		//const long inf = 100000000000000;
		var abc = Console.ReadLine().Split().Select(double.Parse).ToArray();
		double a = abc[0], b = abc[1], c = abc[2], d = abc[3], e = abc[4], f = abc[5];
		b*=d;c*=d;
		e*=a;f*=a;
		double y;
		if(b-e==0) y = 0;
		else y = (c-f)/(b-e);
		double x = (c-b*y)/(a*d);
		Console.Write(x);
		Console.Write(' ');
		Console.WriteLine(y);
	}
}
0