-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from dmoj.executors.java_executor import JavacExecutor | ||
|
||
|
||
class Executor(JavacExecutor): | ||
compiler = 'javac17' | ||
vm = 'java17' | ||
name = 'JAVA17' | ||
jvm_regex = r'java-17-|openjdk17' | ||
|
||
test_program = '''\ | ||
import java.io.IOException; | ||
sealed interface IORunnableInterface permits IORunnable { | ||
public void run() throws IOException; | ||
} | ||
final class IORunnable implements IORunnableInterface { | ||
public void run() throws IOException { | ||
System.out.print(""" | ||
""".strip()); | ||
var buffer = new byte[4096]; | ||
int read; | ||
while ((read = System.in.read(buffer)) >= 0) | ||
System.out.write(buffer, 0, read); | ||
} | ||
} | ||
public class self_test { | ||
public static void main(String[] args) throws IOException { | ||
new IORunnable().run(); | ||
} | ||
}''' | ||
|
||
def get_compile_args(self): | ||
return [self.get_compiler(), '-encoding', 'UTF-8', self._code] |