1 Star 1 Fork 0

Handsomewu666/Code for Work

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ojTest.py 667 Bytes
一键复制 编辑 原始数据 按行查看 历史
Handsomewu666 提交于 3年前 . first push
# -*- coding: utf-8 -*-
'''
@Time : 2022/8/10 14:37
@Author : HandsomeWu
@File : ojTest.py
@Describe: 模拟OJ平台 读入换行数据 换行输出数据
* input:
10 3
3 2 2 1 2 3 1 3 3 3
* output:
[1, 2, 4]
[3, 5, 6, 7, 8, 9, 10]
'''
import math
if __name__ == '__main__':
# 模拟输入 -- 已知输入行数
a, b = map(int, input().split(' '))
print(a,b,sep=' ',end='\n')
data = list(map(int, input().split(' ')))
print(data,sep=' ',end='\n')
# 模拟输出 -- 已知输出行数
x1 = [1, 2, 4]
x2 = [3, 5, 6, 7, 8, 9, 10]
print(*x1,sep=' ',end='\n') # 解包输出
print(*x2,sep=' ',end='\n')
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/handsomewu666/code-for-work.git
git@gitee.com:handsomewu666/code-for-work.git
handsomewu666
code-for-work
Code for Work
master

搜索帮助