题解 | 不要三句号的歪
不要三句号的歪
https://www.nowcoder.com/practice/7cbb7d96fb354f7995d9af1ccf8906b4
#include <iostream> #include <string> #include <vector> using namespace std; int main() { string s; vector<long long>temp; while(getline(cin,s,',')) { if(s.size()==3&&s[0]=='.'&&s[1]=='.'&&s[2]=='.'){ continue; } double j; j=stoll(s); temp.push_back(j); } cout<<temp[temp.size()-1]-temp[1]-1; }