) {
+ if (args.size < 1 || !(args[0] == "1" || args[0] == "2")) {
+ debug("Missing or invalid day argument")
+ exitProcess(1)
+ }
+ val inp = generateSequence(::readLine).joinToString("\n").trim()
+ if (args[0] == "1") {
+ println("${one(inp)}")
+ } else {
+ println("${two(inp)}")
+ }
+}
+
+fun debug(msg: String) {
+ System.err.println(msg)
+}
\ No newline at end of file
diff --git a/templates/main.py b/templates/main.py
new file mode 100644
index 0000000..fdcc3cb
--- /dev/null
+++ b/templates/main.py
@@ -0,0 +1,29 @@
+import sys
+
+
+def parse(instr: str) -> None:
+ return
+
+
+def one(instr: str):
+ return
+
+
+def two(instr: str):
+ return
+
+
+def _debug(*args, **kwargs):
+ kwargs["file"] = sys.stderr
+ print(*args, **kwargs)
+
+
+if __name__ == "__main__":
+ if len(sys.argv) < 2 or sys.argv[1] not in ["1", "2"]:
+ print("Missing day argument", file=sys.stderr)
+ sys.exit(1)
+ inp = sys.stdin.read().strip()
+ if sys.argv[1] == "1":
+ print(one(inp))
+ else:
+ print(two(inp))
\ No newline at end of file
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy