PAT 1093 Python
2020-03-28 20:02
30 查看
PAT 1093 Python
1093 字符串A+B (20 分)
给定两个字符串 A 和 B,本题要求你输出 A+B,即两个字符串的并集。要求先输出 A,再输出 B,但重复的字符必须被剔除。
输入格式:
输入在两行中分别给出 A 和 B,均为长度不超过 106 的、由可见 ASCII 字符 (即码值为32~126)和空格组成的、由回车标识结束的非空字符串。
输出格式:
在一行中输出题面要求的 A 和 B 的和。
输入样例:
This is a sample test
to show you_How it works
输出样例:
This ampletowyu_Hrk
line1 = input() line2 = input() line = line1+line2 output = "" for i in line: if i not in output: output+=i print(output)
- 点赞
- 收藏
- 分享
- 文章举报
相关文章推荐
- PAT乙级题 1029 python解答
- PAT乙级题 1056 python解答
- python实现pat 1054. The Dominant Color (20)
- 1093. Count PAT's
- PAT (Basic Level) Practice (中文) 1024 科学计数法 (20 分) python 语言实现
- PAT 1002 A+B for Polynomials (25) Python
- PAT 1149 Dangerous Goods Packaging python解法
- PAT乙级题 1036 python解答
- PAT乙级之python3篇(一)
- PAT乙级题 1013 python解答
- PAT上分记(python + 完美过关)---1001---害死人不偿命的(3n+1)猜想
- PAT乙级-1093 字符串A+B (20分)
- (PAT乙级)继续(3n+1)猜想(Python)
- (PAT乙级)一元多项式求导(Python)
- PAT甲级1093
- PAT乙级题 1002 python解答
- PAT 1035 Password python解法
- PAT 1046 Shortest Distance python解法
- PAT-B 1005. 继续(3n+1)猜想(python)
- PAT乙级题 1038 python(一个测试点超时)