結果
問題 | No.1175 Simultaneous Equations |
ユーザー |
![]() |
提出日時 | 2020-08-21 21:35:49 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 169 ms / 2,000 ms |
コード長 | 548 bytes |
コンパイル時間 | 2,247 ms |
コンパイル使用メモリ | 75,752 KB |
実行使用メモリ | 55,080 KB |
最終ジャッジ日時 | 2024-10-15 05:19:52 |
合計ジャッジ時間 | 5,162 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 |
ソースコード
import java.util.Scanner;public class Main {public static void main(String[] args) throws Exception {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();sc.close();double q = b / e;double x1 = a - d * q;double x2 = c - f * q;double x = x2 / x1;double p = a / d;double y1 = b - e * p;double y2 = c - f * p;double y = y2 / y1;System.out.println(x + " " + y);}}