mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-06 09:06:51 +08:00
Add automatic linter (#4214)
This commit is contained in:
@ -63,11 +63,9 @@ public class RomanNumeralUtil {
|
||||
|
||||
public static String generate(int number) {
|
||||
if (number < MIN_VALUE || number > MAX_VALUE) {
|
||||
throw new IllegalArgumentException(
|
||||
String.format("The number must be in the range [%d, %d]", MIN_VALUE, MAX_VALUE));
|
||||
throw new IllegalArgumentException(String.format("The number must be in the range [%d, %d]", MIN_VALUE, MAX_VALUE));
|
||||
}
|
||||
|
||||
return (RN_M[number / 1000] + RN_C[number % 1000 / 100] + RN_X[number % 100 / 10]
|
||||
+ RN_I[number % 10]);
|
||||
return (RN_M[number / 1000] + RN_C[number % 1000 / 100] + RN_X[number % 100 / 10] + RN_I[number % 10]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user