結果

問題 No.1175 Simultaneous Equations
ユーザー xRS43BofaUEZ5gcxRS43BofaUEZ5gc
提出日時 2021-03-16 14:43:07
言語 Java21
(openjdk 21)
結果
AC  
実行時間 177 ms / 2,000 ms
コード長 557 bytes
コンパイル時間 7,665 ms
コンパイル使用メモリ 76,624 KB
実行使用メモリ 55,420 KB
最終ジャッジ日時 2024-04-25 13:06:18
合計ジャッジ時間 7,048 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 169 ms
54,956 KB
testcase_01 AC 175 ms
55,208 KB
testcase_02 AC 174 ms
55,068 KB
testcase_03 AC 173 ms
55,176 KB
testcase_04 AC 171 ms
55,304 KB
testcase_05 AC 174 ms
55,208 KB
testcase_06 AC 177 ms
55,328 KB
testcase_07 AC 172 ms
55,108 KB
testcase_08 AC 169 ms
55,212 KB
testcase_09 AC 174 ms
54,972 KB
testcase_10 AC 177 ms
55,348 KB
testcase_11 AC 174 ms
55,420 KB
testcase_12 AC 176 ms
55,156 KB
権限があれば一括ダウンロードができます

ソースコード

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