| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 17675 | lulu | 统计次数 | C++ | Accepted | 0 MS | 248 KB | 304 | 2023-05-16 10:17:13 |
#include<bits/stdc++.h> using namespace std; int main() { string s; cin>>s; cout<<s.length()<<endl; //s.length()的意思是计算字符串s的长度,其返回值是一个整数 int sum=0; for(int i=0;i<s.length();i++){ if(s[i]=='.'){ sum++; } } cout<<sum; return 0; }