First version
This commit is contained in:
commit
243e92a9dd
84 files changed
+4012
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import java.lang.management.ManagementFactory;
|
||||
import java.util.Scanner;
|
||||
public class Sum {
|
||||
public static void main(String[] args) {
|
||||
if (!System.getProperty("java.version").equals("25.0.4.1"))
|
||||
throw new IllegalStateException("Java 25.0.4.1 is required");
|
||||
var vmArgs = ManagementFactory.getRuntimeMXBean().getInputArguments();
|
||||
for (String flag : new String[]{"-Dfile.encoding=UTF-8", "-XX:+UseSerialGC", "-Xss64m", "-XX:TieredStopAtLevel=1", "-XX:ActiveProcessorCount=2", "-Xms2048m", "-Xmx2048m"})
|
||||
if (!vmArgs.contains(flag)) throw new IllegalStateException("Missing " + flag);
|
||||
System.out.println("Java " + System.getProperty("java.version"));
|
||||
System.out.println("VM: " + vmArgs);
|
||||
System.out.print("Input two integers: ");
|
||||
Scanner in = new Scanner(System.in);
|
||||
System.out.println("SUM = " + (in.nextLong() + in.nextLong()));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#include <stdio.h>
|
||||
#ifdef __cplusplus
|
||||
#error This C file must be compiled as C, not C++.
|
||||
#endif
|
||||
#if __STDC_VERSION__ < 202311L
|
||||
#error C23 is required.
|
||||
#endif
|
||||
int main(void) {
|
||||
long long a, b;
|
||||
printf("C23 | GCC %s\nInput two integers: ", __VERSION__);
|
||||
fflush(stdout);
|
||||
if (scanf("%lld %lld", &a, &b) != 2) return 1;
|
||||
printf("SUM = %lld\n", a + b);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#include <iostream>
|
||||
#include <print>
|
||||
#if __cplusplus < 202302L
|
||||
#error C++23 is required.
|
||||
#endif
|
||||
int main() {
|
||||
std::println("C++23 | GCC {}", __VERSION__);
|
||||
std::cout << "Input two integers: " << std::flush;
|
||||
long long a, b;
|
||||
if (!(std::cin >> a >> b)) return 1;
|
||||
std::println("SUM = {}", a + b);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import platform
|
||||
import sys
|
||||
assert platform.python_implementation() == 'PyPy'
|
||||
assert sys.pypy_version_info[:3] == (7, 3, 23)
|
||||
assert sys.version_info[:3] == (3, 11, 15)
|
||||
print('PyPy 7.3.23 | Python ' + platform.python_version())
|
||||
values = input('Input two integers: ').split()
|
||||
print('SUM =', sum(map(int, values)))
|
||||
Reference in new issue
Block a user