Add tags

Add tags to the following comment

JavaScript(Rhino)で。入力は標準入力から。 225byte。

1
2
3
4
r=new java.io.BufferedReader(new java.io.InputStreamReader(java.lang.System["in"]));
d={};
for(i=1;l=r.readLine();i++)for(a=l.match(/\w+/g);w=a&&a.pop();)(d[w]=d[w]||[]).push(i);
for(w in d)println(w+":"+d[w].join(" "));

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...