【九度OJ】1021【模拟】
来源:互联网 发布:淘宝怎么截图给卖家 编辑:程序博客网 时间:2024/05/22 06:22
代码:
package Test1;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;public class Test33_1021 {/** * by qr jobdu 1021 2014-8-19 * @throws IOException */public static void main(String[] args) throws IOException {BufferedReader br=new BufferedReader(new InputStreamReader(System.in));String str1,str2;int len1,len2;while(true){str1=br.readLine();if(str1.equals("#"))break;str2=br.readLine();len1=str1.length();len2=str2.length();int num[]=new int[len1];for(int i=0;i<len2;i++){char temp2=str2.charAt(i);for(int j=0;j<len1;j++){char temp1=str1.charAt(j);if(temp1==temp2)num[j]++;}}for(int i=0;i<len1;i++)System.out.println(str1.charAt(i)+" "+num[i]);}}}
0 0
- 【九度OJ】1021【模拟】
- 【九度OJ】1002【模拟】
- 【九度OJ】1010【模拟】
- 【九度OJ】1022【模拟】
- 【九度OJ】1036【模拟】
- 【九度OJ】1018【模拟】
- 【九度OJ】1048【模拟】
- 【九度OJ】1032【模拟】
- 【九度OJ】1013【模拟】
- 九度OJ 1021 统计字符 (模拟)
- 九度OJ 1014 排名 (模拟)
- 九度OJ 1177 查找 (模拟)
- 九度OJ 1179 阶乘(模拟)
- 九度OJ 打印日期 (模拟)
- 九度oj 1021
- 【九度OJ】1015【模拟】【A+B系列2006】
- 【九度OJ】1060【模拟】【C实现】【清华2000】
- 【九度OJ】1484【模拟】【C实现】【北大2012】
- 黑马程序员:IO流之字节流
- 008实现一个算法从一个单链表中返回倒数第n个元素(keep it up)
- host 配置不生效的解决办法
- 第八章 8.3.1节练习
- 黑马程序员:IO流之间的转换、
- 【九度OJ】1021【模拟】
- 黑马程序员:File对象的基本功能
- 华为副总裁徐家骏离职:年薪千万工作感悟十二条
- 汽车防滑链
- POJ 2398 计算几何+二分+排序
- java io新类及常用输入输出方法
- struts2基础学习二
- 显示图片控件的比较
- 黑马程序员:打印流