結果

問題 No.1175 Simultaneous Equations
ユーザー tentententen
提出日時 2020-08-24 22:03:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 179 ms / 2,000 ms
コード長 455 bytes
コンパイル時間 2,428 ms
コンパイル使用メモリ 85,896 KB
実行使用メモリ 55,152 KB
最終ジャッジ日時 2024-04-24 03:55:22
合計ジャッジ時間 5,679 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 174 ms
55,048 KB
testcase_01 AC 172 ms
54,652 KB
testcase_02 AC 172 ms
55,152 KB
testcase_03 AC 172 ms
54,888 KB
testcase_04 AC 173 ms
54,956 KB
testcase_05 AC 173 ms
55,064 KB
testcase_06 AC 179 ms
55,060 KB
testcase_07 AC 161 ms
55,052 KB
testcase_08 AC 166 ms
55,092 KB
testcase_09 AC 169 ms
54,816 KB
testcase_10 AC 175 ms
54,888 KB
testcase_11 AC 173 ms
55,104 KB
testcase_12 AC 174 ms
54,876 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main (String[] args) {
    	Scanner sc = new Scanner(System.in);
    	double a = sc.nextInt();
    	double b = sc.nextInt();
    	double c = sc.nextInt();
    	double d = sc.nextInt();
    	double e = sc.nextInt();
    	double f = sc.nextInt();
    	double x = (c * e - b * f) / (a * e - b * d);
    	double y = (c * d - a * f) / (b * d - a * e);
    	System.out.println(x + " " + y);
    }
}

0