|
The programming language that you (don't actually) need. (WIP) Modernized C with a touch of Rust and a sprinkle of Go. Example code:global maxRes:s64=-1;
func occrec(N: int, last: s64, M: s64, i: int): void {
branch[
N==i: return;
]
var digit: int=3;
loop[digit<=9] {
branch[
digit == (last%10): {}
else : {
var newLast: s64 = (last*10)+digit;
var modc: s64 = newLast%M;
branch [
modc > maxRes: {
maxRes = modc;
}
]
occrec(N, newLast, M, i+1);
}
]
digit+=3;
}
}Problem from Training Olinfo: ois_cabala |
python testing/benchmarks/run_bench.py cabala