正常的输入
- C++:
- cin>>
- python:
input() 如果用 list(input()) 可以将输入的字符或者数字一个一个分成一个列表
按行输入
- C++:
- getline(cin,a)
- python:
- import sys
- sys.stdin.readlines():
- if(!s.empty())
- {
- while( (index = s.find( ,index)) != string::npos)
- {
- s.erase(index,1);
- }
- }
- C++
- #include <iomanip>
- cout << setprecision(1) << fixed << (sum/TIMES) << endl;
来源: http://www.bubuko.com/infodetail-2509516.html