提出 #75151083
ソースコード 拡げる
import java.util.Scanner;
import java.util.Objects;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int A = scanner.nextInt();
int B = scanner.nextInt();
int C = scanner.nextInt();
int N = A - (A % C);
if (N < A) N += C;
if (B < N) N = -1;
System.out.println(N);
}
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | A - Find Multiple |
| ユーザ | BUILT_IN |
| 言語 | Java24 (OpenJDK 24.0.2) |
| 得点 | 100 |
| コード長 | 410 Byte |
| 結果 | AC |
| 実行時間 | 71 ms |
| メモリ | 40836 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 100 / 100 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | example0.txt, example1.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, example0.txt, example1.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 000.txt | AC | 71 ms | 40708 KiB |
| 001.txt | AC | 68 ms | 40608 KiB |
| 002.txt | AC | 67 ms | 40828 KiB |
| 003.txt | AC | 66 ms | 40160 KiB |
| 004.txt | AC | 69 ms | 40584 KiB |
| 005.txt | AC | 69 ms | 40836 KiB |
| 006.txt | AC | 68 ms | 40780 KiB |
| 007.txt | AC | 68 ms | 40136 KiB |
| example0.txt | AC | 67 ms | 40152 KiB |
| example1.txt | AC | 70 ms | 40420 KiB |