結果
| 問題 | No.485 方程式のお勉強 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-01-25 22:30:30 |
| 言語 | Java (openjdk 25.0.1) |
| 結果 |
AC
|
| 実行時間 | 64 ms / 2,000 ms |
| コード長 | 874 bytes |
| 記録 | |
| コンパイル時間 | 2,893 ms |
| コンパイル使用メモリ | 84,528 KB |
| 実行使用メモリ | 45,792 KB |
| 最終ジャッジ日時 | 2026-01-25 22:30:36 |
| 合計ジャッジ時間 | 4,817 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 13 |
ソースコード
import java.io.*;
import java.util.*;
import java.util.stream.*;
// 処理
class Process {
private int A;
private int B;
Process(int A, int B) {
this.A = A;
this.B = B;
}
String getResult() {
return ((B % A == 0) ? String.valueOf(B / A) : "NO");
}
}
public class Main {
public static void main(String[] args) throws IOException {
var bufferedReader = new BufferedReader(new InputStreamReader(System.in));
var printWriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
// 入力
int[] input = Stream.of(bufferedReader.readLine().trim().split("[ ]+")).mapToInt(Integer::parseInt).toArray();
// 出力
printWriter.println((new Process(input[0], input[1])).getResult());
bufferedReader.close();
printWriter.close();
}
}