题解 | while

while

https://www.nowcoder.com/practice/173564fc07c146a88c408c92f4182c65

#include <bits/stdc++.h>
using namespace std;
int main(){
	int cnt = 0;
    string a = "while";
    string s;
    cin >> s;
    for(int i = 0; i < 5; i ++){
    	if(s[i] != a[i]) cnt ++;
	}
	cout << cnt;
    return 0;
}

全部评论

相关推荐

二十岁的编程男神王大...:读博吧兄弟,你这绩点太好了,何必转码,另外哈哈哈真见到有括号标出来985的,这个不标注也知道吧
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务