PythonChallenge_第2题
来源:互联网 发布:史陶比尔软件 编辑:程序博客网 时间:2024/06/05 07:03
点击题目链接
统计字符串中出现最少的字符
package PythonChallenge;import java.io.PrintStream;import java.util.Scanner;class Level01{ Scanner in=new Scanner(System.in); PrintStream out=System.out; Level01(){ char[] str=in.nextLine().toCharArray(); translation(str); out.println(str); char[] str1="map".toCharArray(); translation(str1); out.println(str1);//ocr } void translation(char[] str){ for(int i=0;i<str.length;++i){ if(str[i]>='a' && str[i]<='x'){ str[i]=(char) (str[i]+2); }else if(str[i]=='y'){ str[i]='a'; }else if(str[i]=='z'){ str[i]='b'; } } }}public class pychallenge01 { public static void main(String[] args) { new Level01(); }}
0 0
- PythonChallenge_第2题
- PythonChallenge_第1题
- 第2章第2题
- 第2章 第2题
- 第2章第3题
- 第2章第4题
- 第2章第5题
- 第2章第6题
- 第2章 第3题
- 第2章 第4题
- 第2章 第5题
- 第2章 第6题
- 第4章 第2题
- 第5章 第2题
- 第5章第2题
- 第7章第2题
- 第7章 第2题
- 第10章第2题
- PythonChallenge_第1题
- 《Effective Objective-C 2.0》2、数据的定义方法
- Asp.net MVC Controller学习
- rfid作业
- 《c和指针》读书笔记2
- PythonChallenge_第2题
- TCP协议的KeepAlive机制与HeartBeat心跳包
- 4.21模拟,SDOI2015Round1Test2
- [APP开发] 在 Win 7或8 下使用 VirtualBOX 虚拟机安装 OS X 10.10 Yosemite 及 Xcode 6.1
- 【算法笔记】多线程斐波那契数列
- uva 11400 Lighting System Design dp
- 快速排序(二)
- 快速找到单链表的中间节点
- 窗口有关算法题目