using System; using Nemerle.IO; class App { public static Main() : int { def buf = array(4096); mutable nl = 0; mutable nw = 0; mutable nc = 0; mutable state = false; mutable nread = Console.In.Read( buf, 0, 4096); while( nread > 0 ) { nc = nc + nread; for (mutable i = 0; i < nread; i = i + 1) { def c = buf[i]; when (c == '\n') nl = nl + 1; if (c == ' ' || c == '\n' || c == '\t') state = false else when (state == false) { state = true; nw = nw + 1; } }; nread = Console.In.Read( buf, 0, 4096); }; printf ("%d %d %d\n", nl, nw, nc); 0 } }