Run D online — D2, browser-hosted, native performance.
D is a systems language with the raw performance of C++ but a friendlier syntax, better metaprogramming, and optional garbage collection. Small but committed community; used in production at Netflix, Weka, and inside some parts of the Linux kernel test harness.
ls-judge compiles D with the standard DMD/LDC toolchain inside a Firecracker microVM.
Clicking "Run now" opens the playground with this exact code and a matching test case pre-loaded — passes on first Run.
import std.stdio, std.conv, std.string;
void main() { int n = readln().strip().to!int; writeln(n * 2); }
21
42