a-conjecture-of-mine

An exercise on polyglossy: the same problem solved on multiple languages

Commit
475301d7e02ab1acc3736b3095c40188e6dfa47c
Parent
39acbbf08b9972fde4cb6209775806dac94bae1c
Author
Pablo Emilio Escobar Gaviria <pablo-escobar@riseup.net>
Date

Fixed small syntax errors in java/Main.java

Diffstat

2 files changed, 15 insertions, 7 deletions

Status File Name N° Changes Insertions Deletions
Modified Makefile 20 14 6
Modified java/Main.java 2 1 1
diff --git a/Makefile b/Makefile
@@ -1,15 +1,18 @@
 c-bin:
-	gcc -pthread -o bin/c ./c/main.c
+	gcc -O2 -pthread -o bin/c ./c/main.c
 
 elixir-bin:
 	elixirc -o bin/elixir ./elixir/main.ex
 
 go-bin:
-	cd ./go/ ; go build ; mv ./go ../bin/go ; cd ..
+	cd ./go/
+	go build
+	mv ./go ../bin/go
+	cd ..
 
 haskell-bin:
 	ghc --make -O -o ./bin/haskell ./haskell/Main.hs \
-	    && rm ./haskell/*.o ./haskell/*.hi
+	  && rm ./haskell/*.o ./haskell/*.hi
 
 java-bin:
 	javac ./java/Main.java
@@ -19,11 +22,16 @@ kotlin-bin:
 	kotlinc ./kotlin/main.kt -d ./bin/kotlin.jar
 
 ocaml-bin:
-	ocamlfind ocamlopt -thread -package threads -o ./bin/ocaml -linkpkg ./ocaml/main.ml \
-	    && rm ./ocaml/*.cmi ./ocaml/*.cmx ./ocaml/*.o
+	ocamlfind                  \
+		ocamlopt                 \
+		-thread                  \
+		-package threads         \
+		-o ./bin/ocaml           \
+		-linkpkg ./ocaml/main.ml \
+	  && rm ./ocaml/*.cmi ./ocaml/*.cmx ./ocaml/*.o
 
 rust-bin:
-	rustc -v -o ./bin/rust ./rust/main.rs
+	rustc -v -O -o ./bin/rust ./rust/main.rs
 
 wasm-bin:
 	wat2wasm ./wasm/main.wat -o ./bin/wasm.wasm
diff --git a/java/Main.java b/java/Main.java
@@ -13,7 +13,7 @@ public class Main {
     public static void main(String[] args) {
         try {
             int max = Integer.parseInt(args[0]);
-            if (max <= 0) throw IllegalArgumentException();
+            if (max <= 0) throw new IllegalArgumentException();
 
             if (counterexample(max)) {
                 System.exit(FAIL);