Download benchmarks/quixbugs/java/GCD.java from SevdanurGenc/LLM-Automated-Test-Generation-Agent: direct link, hf CLI and curl.
- Browser
- Download file 518 Bytes
-
https://huggingface.co/SevdanurGenc/LLM-Automated-Test-Generation-Agent/resolve/main/benchmarks/quixbugs/java/GCD.java
- Command line
-
hf download hf://SevdanurGenc/LLM-Automated-Test-Generation-Agent/benchmarks/quixbugs/java/GCD.java
-
curl -L -o GCD.java https://huggingface.co/SevdanurGenc/LLM-Automated-Test-Generation-Agent/resolve/main/benchmarks/quixbugs/java/GCD.java
518 Bytes
| import java.util.*; | |
| /** | |
| * Input: | |
| * a: A nonnegative int | |
| * b: A nonnegative int | |
| * | |
| * | |
| * Greatest Common Divisor | |
| * | |
| * Precondition: | |
| * isinstance(a, int) and isinstance(b, int) | |
| * | |
| * Output: | |
| * The greatest int that divides evenly into a and b | |
| * | |
| * Example: | |
| * >>> gcd(35, 21) | |
| * 7 | |
| * | |
| * @author derricklin | |
| */ | |
| public class GCD { | |
| public static int gcd(int a, int b) { | |
| if (b == 0) { | |
| return a; | |
| } else { | |
| return gcd(b, a%b); | |
| } | |
| } | |
| } | |