Python造数据模板

注:需要下载cyaron第三方库!!!

这个项目时洛谷开发的哟!详情请见:https://www.luogu.org/discuss/show/11410

from cyaron import *

#i从1循环到3

for i in range(1,4):

    #创建文件,文件名为“heat”
    test_data=IO(file_prefix="heat", data_id=i)

    #制造两个10以内的数
    s=randint(1,10)
    t=randint(1,10)

    #将数据输出到in文件里
    test_data.input_writeln(s, t)

    #运行std,并将输出数据输到out文件里    
    test_data.output_gen("D:\\std_binary.exe")

更多用法:https://github.com/luogu-dev/cyaron

posted @ 2019-01-31 19:32  lyclyc_NSP  阅读(728)  评论(0编辑  收藏  举报