BestCoder#15 A-LOVE(暴力)
Love
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 123 Accepted Submission(s): 90
When a couple want to give name to their offspring, they will firstly get their first names, and list the one of the male before the one of the female. Then insert the string “small” between their first names. Thus a new name is generated. For example, the first name of male is Green, while the first name of the female is Blue, then the name of their offspring is Green small Blue.
You are expected to write a program when given the name of a couple, output the name of their offsping.
The first line lists the name of the male.
The second line lists the name of the female.
In each line the format of the name is [given name]_[first name].
Please process to the end of file.
[Technical Specification]
3 ≤ the length of the name ≤ 20
[given name] only contains alphabet characters and should not be empty, as well as [first name].
Alan_Blue
- import java.io.*;
- import java.util.*;
- import java.text.*;
- public class BestCoder15 {
- public static void main(String[] args){
- Scanner sc = new Scanner(new InputStreamReader(System.in));
- while(sc.hasNextLine()){
- String s1 = new String(sc.nextLine());
- String s2 = new String(sc.nextLine());
- String[] str1 = s1.split("_");
- String[] str2 = s2.split("_");
- System.out.println(str1[1] + "_small_" + str2[1]);
- }
- sc.close();
- }
- }
BestCoder#15 A-LOVE(暴力)的更多相关文章
- HDU 5908 Abelian Period (BestCoder Round #88 模拟+暴力)
HDU 5908 Abelian Period (BestCoder Round #88 模拟+暴力) 题目链接http://acm.hdu.edu.cn/showproblem.php?pid=59 ...
- project euler 开坑
pe76: 要把100写成至少2个数的和的形式,有多少种方案数 整数拆分 f(i,j)表示把i拆分成不超过j的数的和的方案数 f(i,j) = f(i-j,j) + f(i,j-1) j <= ...
- 转载 Appstore 上传被拒原因及解释
原 apps被拒绝的各种理由以及翻译 1. Terms and conditions(法律与条款) 2. Functionality(功能) 3. Metadata (name, descriptio ...
- iOS提交AppStore被拒原因
1. Terms and conditions(法律与条款) 1.1 As a developer of applications for the App Store you are bound by ...
- app被Rejected 的各种原因翻译
1. Terms and conditions(法律与条款) 1.1 As a developer of applications for the App Store you are bound by ...
- A very hard Aoshu problem
A very hard Aoshu proble Problem Description Aoshu is very popular among primary school students. It ...
- Codeforces Round #306 (Div. 2) ABCDE(构造)
A. Two Substrings 题意:给一个字符串,求是否含有不重叠的子串"AB"和"BA",长度1e5. 题解:看起来很简单,但是一直错,各种考虑不周全, ...
- app被Rejected 的各种原因翻译。这个绝对有用。
1. Terms and conditions(法律与条款) 1.1 As a developer of applications for the App Store you are bound by ...
- ios 项目被拒绝各种理由
. Terms and conditions(法律与条款) 1.1 As a developer of applications for the App Store you are bound by ...
随机推荐
- 关于jQuery新的事件绑定机制on()的使用技巧
关于jQuery新的事件绑定机制on()的使用技巧 http://www.jb51.net/article/36064.htm 本篇文章介绍了,关于jQuery新的事件绑定机制on()的使用技巧.需要 ...
- C++联合
原文地址:http://ideage.javaeye.com/blog/210614 联合(union)在C/C++里面见得并不多,但是在一些对内存要求特别严格的地方,联合又是频繁出现,那么究竟什么是 ...
- jquery文件上传控件 Uploadify 问题记录
Uploadify v3.2.1 首先引用下面的文件 <!--上传控件 uploadify--> <script type="text/javascript" s ...
- Git撤销提交和修改相关操作
团队开发中经常遇到错误删除文件,错误提交等情况,那么使用Git该如何正确的进行撤销和恢复呢? 一.增补提交 git commit –C HEAD –a --amend -C表示复用指定提交的提交留言, ...
- 无废话ExtJs 入门教程四[表单:FormPanel]
无废话ExtJs 入门教程四[表单:FormPanel] extjs技术交流,欢迎加群(201926085) 继上一节内容,我们在窗体里加了个表单.如下所示代码区的第28行位置,items:form. ...
- MVA Universal Windows Apps系列学习笔记1
昨天晚上看了微软的Build 2015大会第一天第一场演讲,时间还挺长,足足3个小时,不过也挺震撼的.里面提到了windows 10.Microsoft edge浏览器.Azure云平台.Office ...
- 攻城狮在路上(叁)Linux(二十六)--- linux文件系统的特殊查看与操作
一.boot sector 与 super block的关系: 1.boot sector用于存放引导装载程序,占用1024个字节. 2.super block的大小也为1024字节. 3.若bloc ...
- maven 依赖查询
该文章源地址:http://xiejianglei163.blog.163.com/blog/static/1247276201362733217604/ 为方便个人使用,转载于此处. http:// ...
- 单链表带头结点&不带头结点
转自:http://blog.csdn.net/xlf13872135090/article/details/8857632 Node *head; //声明头结点 带头结点初始化 void I ...
- Android入门开发之SD卡读写操作(转)
SD卡的读写是我们在开发android 应用程序过程中最常见的操作.下面介绍SD卡的读写操作方式: 1. 获取SD卡的根目录 String sdCardRoot = Environment.getE ...