結果
| 問題 |
No.1175 Simultaneous Equations
|
| コンテスト | |
| ユーザー |
masayoshi361
|
| 提出日時 | 2020-08-21 21:25:43 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 2,000 ms |
| コード長 | 795 bytes |
| コンパイル時間 | 2,589 ms |
| コンパイル使用メモリ | 104,576 KB |
| 実行使用メモリ | 19,840 KB |
| 最終ジャッジ日時 | 2024-10-15 05:05:59 |
| 合計ジャッジ時間 | 1,791 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 11 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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);
}
}
masayoshi361