洛谷网校
NOIP提高组自测题
1、p5015

解答
c++ IDE:devc++
使用getline读取一行,然后用字符串流读取每一行,其实好像不用这样

node.js IDE:webstorm
node使用readline读取输入,用on监听“line”事件

java IDE:eclipse
java使用scanner类来读取输入,获取字符串长度用length(),遍历字符串需要用到charAt

python3 IDE:idle
python输入用input,遍历字符串用for in;

php IDE:sublime3
php读取输入用的file_get_contents,这个函数还可以用来读文件以及http流等,遍历字符串还需要用strlen获取字符串长度,

网友评论