提出 #43585877
ソースコード 拡げる
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
try (Scanner scanner = new Scanner(System.in)) {
int n = scanner.nextInt();
int p = scanner.nextInt();
int q = scanner.nextInt();
List<Integer> d = new ArrayList<>();
for (int i = 0; i < n; i++) {
d.add(scanner.nextInt());
}
int min = d.stream().mapToInt(value -> value).min().getAsInt();
System.out.println(Math.min(p, q + min));
}
}
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | A - Order Something Else |
| ユーザ | kmatsu |
| 言語 | Java (OpenJDK 11.0.6) |
| 得点 | 100 |
| コード長 | 546 Byte |
| 結果 | AC |
| 実行時間 | 124 ms |
| メモリ | 35900 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, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, example0.txt, example1.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 000.txt | AC | 116 ms | 35564 KiB |
| 001.txt | AC | 124 ms | 35808 KiB |
| 002.txt | AC | 123 ms | 35700 KiB |
| 003.txt | AC | 121 ms | 35836 KiB |
| 004.txt | AC | 113 ms | 35820 KiB |
| 005.txt | AC | 116 ms | 35456 KiB |
| 006.txt | AC | 112 ms | 35436 KiB |
| 007.txt | AC | 122 ms | 35768 KiB |
| 008.txt | AC | 117 ms | 35640 KiB |
| 009.txt | AC | 109 ms | 35776 KiB |
| 010.txt | AC | 119 ms | 35492 KiB |
| 011.txt | AC | 114 ms | 35780 KiB |
| 012.txt | AC | 116 ms | 35900 KiB |
| example0.txt | AC | 111 ms | 35520 KiB |
| example1.txt | AC | 107 ms | 35520 KiB |