Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.example.task10;

import java.util.Arrays;

public class Task10Main {
public static void main(String[] args) {
//здесь вы можете вручную протестировать ваше решение, вызывая реализуемый метод и смотря результат
Expand All @@ -11,8 +13,8 @@ public static void main(String[] args) {
}

static int numMin(int[] arr) {
//todo напишите здесь свою корректную реализацию этого метода, вместо существующей
return 0;
int min = Arrays.stream(arr).min().getAsInt();
for (int i = arr.length - 1; i >= 0; i--) if (arr[i] == min) return i;
throw new IllegalStateException();
}

}