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 ...
随机推荐
- 解决客户端访问https报错
现象: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure at com.sun.net.ssl. ...
- CSDN-markdown编辑器
欢迎使用Markdown编辑器写博客 本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦: Markdown和扩展Markdown简洁的语法 代码块高亮 图片链接 ...
- vim 打开高亮和关闭高亮
:set hls 找开高亮 :set nohls 关闭高亮
- IIS网站发布若干问题
1.Win7 64位 IIS未能加载文件或程序集"System.Data.SQLite"或它的某一个依赖项 未能加载文件或程序集"System.Data.SQLite ...
- Delphi线程同步(临界区、互斥、信号量)
当有多个线程的时候,经常需要去同步这些线程以访问同一个数据或资源. 例如,假设有一个程序,其中一个线程用于把文件读到内存,而另一个线程用于统计文件的字符数.当然,在整个文件调入内存之前,统计它的计数是 ...
- Oracle优化-表设计
前言 绝大多数的Oracle数据库性能问题都是由于数据库设计不合理造成的,只有少部分问题根植于Database Buffer.Share Pool.Redo Log Buffer等内存模块配置不合理, ...
- Oracle 数据泵文件
数据泵文件 expdp介绍 EXPDP命令行选项1. ATTACH该选项用于在客户会话与已存在导出作用之间建立关联.语法如下ATTACH=[schema_name.]job_nameSchema_na ...
- android 入门-本地化语言
打包安装到手机上,改变手机系统语言,你在看看是不是改变了.哇.真的可以.
- RTP RTCP在音视频传输与同步方面的使用
转自:http://blog.csdn.net/kof98765/article/details/17733701 1 音视频实时传输 1.1 Jrtplib库介绍 本系统采用开源库Jrtplib进行 ...
- JVM字节码之整型入栈指令(iconst、bipush、sipush、ldc)
官网:http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html 原文地址:http://www.linmuxi.com/2016/02 ...