#!/usr/bin/python # $Id: wc.python,v 1.3 2001/06/30 16:00:51 doug Exp $ # http://www.bagley.org/~doug/shootout/ # with help from Brad Knotwell import sys def main(): nl = nw = nc = 0 rl = sys.stdin.readlines lines = rl(4096) while lines: nl += len(lines) for line in lines: nc += len(line) nw += len(line.split()) lines = rl(4096) print "%d %d %d" % (nl, nw, nc) main()