#!/usr/bin/rdmd
import std.stdio;
enum COMPILED_ON = __TIMESTAMP__;
enum character = '©';
enum copy_valid = '©';
enum backslash_escaped = '\\';
enum str = `hello "world"!`;
enum multiline = r"lorem
ipsum
dolor";
enum multiline2 = "sit
amet
\"adipiscing\"
elit.";
enum hex = x"66 6f 6f";
#line 5
enum f = [3.14f, .1, 1., 1e100, 0xc0de.01p+100];
static if (something == true) {
import std.algorithm;
}
void main() pure nothrow @safe {
ulong lines = 0;
double sumLength = 0;
foreach (line; stdin.byLine()) {
++lines;
sumLength += line.length;
}
writeln("Average line length: ",
lines ? sumLength / lines : 0);
}