Make most solutions work with make or shebang.

This commit is contained in:
2017-12-22 16:56:58 +01:00
parent 2a35384c76
commit 63744509d5
13 changed files with 25 additions and 0 deletions
+1
View File
@@ -1,3 +1,4 @@
CXXFLAGS=-Wall -Wextra -pedantic -O3 -std=c++14
all: solution
./$<
Regular → Executable
+1
View File
@@ -1,3 +1,4 @@
#!/usr/bin/env clojure
(defn lower_root [n] (int (Math/floor (Math/sqrt n))))
(defn box_size [n] (
Regular → Executable
+1
View File
@@ -1,3 +1,4 @@
#!/usr/bin/awk -f
function word2key(word, a, i, n, result)
{
n = split(word, a, "")
+1
View File
@@ -0,0 +1 @@
solution.exe
+5
View File
@@ -0,0 +1,5 @@
all: solution.exe
mono $<
solution.exe: solution.cs
mcs $< -o $@
Regular → Executable
+1
View File
@@ -1,3 +1,4 @@
#!/usr/bin/env scala
import scala.io.StdIn
object solution {
Regular → Executable
+1
View File
@@ -1,3 +1,4 @@
#!/usr/bin/env node
const stdin = process.openStdin();
let content = '';
Regular → Executable
+1
View File
@@ -1,3 +1,4 @@
///usr/bin/env go run $0 $@ ; exit
package main
import "fmt"
+1
View File
@@ -0,0 +1 @@
solution
+5
View File
@@ -0,0 +1,5 @@
all: solution
./$<
solution: solution.rs
rustc $< -o $@
+5
View File
@@ -0,0 +1,5 @@
all: solution
./$<
solution: solution.hs
ghc $< -o $@
Regular → Executable
+1
View File
@@ -1,3 +1,4 @@
#!/usr/bin/env groovy
void doRotate(List<String> list, String arg) {
def amount = Integer.valueOf(arg.substring(1))
Regular → Executable
+1
View File
@@ -1,3 +1,4 @@
#!/usr/bin/env coffee
String.prototype.count = (pattern) ->
(this.match(pattern) || []).length