Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
compile d online
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
import std.stdio, std.algorithm, std.range; int c; const x = 12, y = 65, z = 50, s = 100000; void solve(Range)(Range r) { cartesianProduct(r, r, r).filter!(i => i[0] * (y + 3 * z) + i[1] * (y + 2 * z) + i[2] * (y + z) == s).each!dout; } void main() { auto a = iota(0, x + 1).array; solve(a); writefln(`%s total`, c); } void dout(Tuple)(Tuple idx) { ++c; }
dmd
Show compiler warnings
[
+
] Compiler args
[
+
]
Show input
Compilation time: 0.74 sec, absolute running time: 0.05 sec, cpu time: 0 sec, memory peak: 3 Mb, absolute service time: 0.8 sec
edit mode
|
history
0 total