Download buy_two_chocolates/java_tests/Main.java from FPEvalDataset/LeetCodeProblem: direct link, hf CLI and curl.
- Browser
- Download file 439 Bytes
-
https://huggingface.co/datasets/FPEvalDataset/LeetCodeProblem/resolve/fa9b0dcfee8d3e30089c6f7d4e5fafca7e801ea8/buy_two_chocolates/java_tests/Main.java
- Command line
-
hf download hf://datasets/FPEvalDataset/LeetCodeProblem@fa9b0dcfee8d3e30089c6f7d4e5fafca7e801ea8/buy_two_chocolates/java_tests/Main.java
-
curl -L -o Main.java https://huggingface.co/datasets/FPEvalDataset/LeetCodeProblem/resolve/fa9b0dcfee8d3e30089c6f7d4e5fafca7e801ea8/buy_two_chocolates/java_tests/Main.java
439 Bytes
| import static org.junit.jupiter.api.Assertions.*; | |
| import org.junit.jupiter.api.Test; | |
| import java.util.List; | |
| import java.util.Arrays; | |
| import java.util.ArrayList; | |
| public class Main { | |
| //Program start | |
| //Program end | |
| public void test1() { | |
| assertEquals(0, buyChoco(new ArrayList<>(Arrays.asList(1,2,2)), 3)); | |
| } | |
| public void test2() { | |
| assertEquals(3, buyChoco(new ArrayList<>(Arrays.asList(3,2,3)), 3)); | |
| } | |
| } | |