|
|
|
|
背景 Background |
|
|
为了for beginngers,特设此题,^_^
|
|
|
|
|
|
|
|
描述 Description |
|
|
要对一个仅有英文字母的密文进行压缩处理,将其中连续的重复字母压缩成“一个字母+个数”的形式。例如:AaaaaaaaAaaBbBaAC应压缩成a11b3a2c。但是华华拿到的密码已经被别人处理过,密文没有完全压缩好,处理起来反而更麻烦。如上例密文可能已变成Aa10b2BaAC。请编程帮华华完成任务。
输入:华华拿到的密文字串(串长度<=100,串中所有重复个数之和<=1000)
输出:完成处理的密文字串(其中的字母全部小写)
例如:输入:(compress.in)
Aa10b2BaAC
输出:(compress.out)
a11b3a2c
|
|
|
|
|
|
|
|
输入格式 Input Format |
|
|
华华拿到的密文字串(串长度<=100,串中所有重复个数之和<=1000)
|
|
|
|
|
|
|
|
输出格式 Output Format |
|
|
完成处理的密文字串(其中的字母全部小写) |
|
|
|
|
|
|
|
时间限制 Time Limitation |
|
|
各个测试点1s
|
|
|
|
|
|
|
|
注释 Hint |
|
|
Free Pascal Code:
-------------------
program Plus;
var a,b:longint;
begin
readln(a,b);
writeln(a+b);
end.
C++ Code:
-------------------
#include <iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<a+b<<endl;
return 0;
}
|
|
|
|
|
|
|
|
|
Flag |
|
题号 |
P1093 |
|
其它 |
通过 |
7人 |
提交 |
26次 |
通过率 |
27% |
难度 |
0 |
|
|
|
|
|
|