結果

問題 No.1175 Simultaneous Equations
ユーザー xRS43BofaUEZ5gc
提出日時 2021-03-16 14:43:07
言語 Java
(openjdk 23)
結果
AC  
実行時間 176 ms / 2,000 ms
コード長 557 bytes
コンパイル時間 3,864 ms
コンパイル使用メモリ 76,196 KB
実行使用メモリ 42,968 KB
最終ジャッジ日時 2024-11-08 00:17:57
合計ジャッジ時間 6,914 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class HelloWorld {

	    public static void main(String[] args) throws Exception {

	    	Scanner sc = new Scanner(System.in);
	    	double a = sc.nextDouble();
	    	double b = sc.nextDouble();
	    	double c = sc.nextDouble();
	    	double d = sc.nextDouble();
	    	double e = sc.nextDouble();
	    	double f = sc.nextDouble();
	    	sc.close();

	    	double y = (a * f - d * c) / (a * e - b * d);
	    	double x = c/a - (a * f - c * d) * b / a / (a * e - b * d);

	    	System.out.println(x + " " + y);
	    	}

	    }
0