全部评论
先拍个序
可能无序吧
哎呀 我也做了这一题,也是通过不了
public static void main(String[] args) {
Scanner sc = new Scanner(System.in); while (sc.hasNext()) {
String str = sc.nextLine(); int count = 0; char c,c1; for (int i = 0; i <str.length() ; i++) {
c = str.charAt(i); if(i!=str.length()-1){
c1 = str.charAt(i+1); }else {
c1 = c; } if(c!=c1){
count++; }
}
System.out.println(count); }
}
没有输入输出吧。
这没法运行吧,没有输入也没有函数调用。
啥意思
禁用io吧
相关推荐
点赞 评论 收藏
分享
12-17 14:56
辽宁石油化工大学 嵌入式软件开发 allin实习的大白...:我把第二个项目发出来了,如果感兴趣可以去研究研究,欢迎交流。
https://gitee.com/jtyjtyjty333/ind-dist-ai-sec-edge-cloud
https://github.com/jtylab/ind-dist-ai-sec-edge-cloud
点赞 评论 收藏
分享
