update tests
All checks were successful
Reverse Tests / test (push) Successful in 6s
Sum Tests / test (push) Successful in 7s

This commit is contained in:
2026-01-30 16:36:08 +05:00
parent 8414aeb924
commit 04af91b4a7
7 changed files with 186 additions and 41 deletions

View File

@@ -40,42 +40,4 @@ public class Reverse {
}
out.flush();
}
static class FastScanner {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = null;
int pos = 0;
boolean hasNextLine() throws IOException {
if (line != null && pos < line.length()) return true;
line = br.readLine();
pos = 0;
return line != null;
}
boolean hasNextInt() {
if (line == null) return false;
while (pos < line.length() && Character.isWhitespace(line.charAt(pos))) pos++;
return pos < line.length();
}
int nextInt() {
while (pos < line.length() && Character.isWhitespace(line.charAt(pos))) pos++;
int start = pos;
boolean negative = line.charAt(pos) == '-';
if (negative) pos++;
while (pos < line.length() && Character.isDigit(line.charAt(pos))) pos++;
int result = 0;
for (int i = negative ? start + 1 : start; i < pos; i++) {
result = result * 10 + (line.charAt(i) - '0');
}
return negative ? -result : result;
}
void nextLine() {
pos = line.length();
}
}
}