示例#1
0
def test_main():
    in_str = """
6
2
1 6 9 3 6 7    
    """.strip()
    assert get_output_with_stdin(main, in_str) == "5"
示例#2
0
def test_main():
    in_str = """
4 11
cAda
AbrAcadAbRa
""".strip()
    assert get_output_with_stdin(main, in_str) == "2"
示例#3
0
def test_main():
    in_str = """
3
5 17
*****************
.............**$*
*B*A*P*C**X*Y*.X.
*y*x*a*p**$*$**$*
*****************
cz
5 11
*.*********
*...*...*x*
*X*.*.*.*.*
*$*...*...*
***********
0
7 7
*ABCDE*
X.....F
W.$$$.G
V.$$$.H
U.$$$.J
T.....K
*SQPML*
irony    
    """.strip()
    expected = """
3
1
0    
""".strip()
    assert get_output_with_stdin(main, in_str) == expected
示例#4
0
def test_main():
    in_str = """
3
6 8 9
5
2 5 2 4 7    
""".strip()
    assert get_output_with_stdin(main, in_str) == "2"
示例#5
0
def test_main():
    in_str = """
3 6
antarctica
antahellotica
antacartica
""".strip()
    assert get_output_with_stdin(main, in_str) == "2"
示例#6
0
def test_main():
    in_str = """
3
1 5 10
3 1 5
5 3 7
""".strip()
    assert get_output_with_stdin(main, in_str) == "14"
示例#7
0
def test_main():
    in_str = """
1
2 3
1 2
1 2
1 2
""".strip()
    assert get_output_with_stdin(main, in_str) == "2"
示例#8
0
def test_main():
    in_str = '''
5 17
    '''.strip()

    out_str = '''
4
'''.strip()
    assert get_output_with_stdin(main, in_str) == out_str
示例#9
0
def test_main4():
    in_str = '''
1000000000 999999999
    '''.strip()

    out_str = '''
-1
'''.strip()
    assert get_output_with_stdin(main, in_str) == out_str
示例#10
0
def test_main6():
    in_str = '''
5377378 4800373
    '''.strip()

    out_str = '''
392672
'''.strip()
    assert get_output_with_stdin(main, in_str) == out_str
示例#11
0
def test_main3():
    in_str = '''
0 0
    '''.strip()

    out_str = '''
1
'''.strip()
    assert get_output_with_stdin(main, in_str) == out_str
示例#12
0
def test_main2():
    in_str = '''
100 80
    '''.strip()

    out_str = '''
6
'''.strip()
    assert get_output_with_stdin(main, in_str) == out_str
示例#13
0
def test_main5():
    in_str = '''
5 5
    '''.strip()

    out_str = '''
-1
'''.strip()
    assert get_output_with_stdin(main, in_str) == out_str
示例#14
0
def test_main():
    in_str = '''
10000 100000
    '''.strip()

    out_str = '''
2503
'''.strip()
    assert get_output_with_stdin(main, in_str) == out_str
示例#15
0
def test_main():
    in_str = """
5
***#*
*.!.*
*!.!*
*.!.*
*#***
""".strip()
    assert get_output_with_stdin(main, in_str) == "2"
示例#16
0
def test_main2():
    in_str = '''
9 1
1 2 3 4 5 6 7 8 9
    '''.strip()

    out_str = '''
45
'''.strip()
    assert get_output_with_stdin(main, in_str) == out_str
示例#17
0
def test_main():
    inputs = """
4 3
0
2 1 2
1 3
3 2 3 4
    """.strip()
    outputs = "3"
    assert get_output_with_stdin(main, inputs) == outputs
示例#18
0
def test_main():
    in_str = '''
5
1 1 1 6 0
2 7 8 3 1
    '''.strip()

    out_str = '''
18
'''.strip()
    assert get_output_with_stdin(main, in_str) == out_str
示例#19
0
def test_main():
    in_str = '''
3 3
1 2 10
1 3 9
2 3 -3
    '''.strip()
    out_str = '''
7
    '''.strip()
    assert get_output_with_stdin(main, in_str) == out_str
示例#20
0
def test_main2():
    in_str = '''
XYZ
1
ZAAAAAAAXY
    '''.strip()

    out_str = '''
1
'''.strip()
    assert get_output_with_stdin(main, in_str) == out_str
示例#21
0
def test_main():
    in_str = """
2
###.###
#.#.#.#
#.#.###
#.#...#
###.###    
""".strip()
    res = float(get_output_with_stdin(main, in_str))
    print(res, file=sys.stderr)
    assert res == pytest.approx(48.5)
示例#22
0
def test_main2():
    in_str = '''
4 4
1 2 -1
2 3 -3
1 1 -1
3 4 1
    '''.strip()
    out_str = '''
-1
    '''.strip()
    assert get_output_with_stdin(main, in_str) == out_str
示例#23
0
def test_main3():
    in_str = '''
PQR
3
PQRAAAAPQR
BBPQRBBBBB
CCCCCCCCCC
    '''.strip()

    out_str = '''
2
'''.strip()
    assert get_output_with_stdin(main, in_str) == out_str
示例#24
0
def test_main():
    in_str = '''
ABCD
3
ABCDXXXXXX
YYYYABCDXX
DCBAZZZZZZ
    '''.strip()

    out_str = '''
2
'''.strip()
    assert get_output_with_stdin(main, in_str) == out_str
示例#25
0
def test_main():
    in_str = '''
3 1000 2 3
200
0 2 2
300
27 3 20    
    '''.strip()

    out_str = '''
900
'''.strip()
    assert get_output_with_stdin(main, in_str) == out_str
示例#26
0
def test_main():
    in_str = '''
4
bar
abracadabra
bear
bar
baraxbara
    '''.strip()

    out_str = '''
3
'''.strip()
    assert get_output_with_stdin(main, in_str) == out_str
示例#27
0
def test_main(in_str, out_str):
    in_str = '''
4
12 0
10 14
4 20
5 2147483648    
    '''
    out_str = '''
1
2
0
1
    '''
    assert get_output_with_stdin(main, in_str) == out_str
示例#28
0
def test_main():
    inputs = """
4
1
4
10
100
    """.strip()
    outputs = """
1
4
5
5
    """.strip()
    assert result_check.get_output_with_stdin(main, inputs).strip() == outputs
示例#29
0
def test_main():
    in_str = '''
30
50
55
60
65
70
75
80
85
90
95
100
105
110
115
120
125
130
135
140
145
150
155
160
165
170
175
180
185
    '''.strip()
    out_str = '''
3 4 2 3 3 13
    '''.strip()
    assert get_output_with_stdin(main, in_str) == out_str
示例#30
0
def test_main(inputs, outputs):
    inputs = inputs.strip()
    assert get_output_with_stdin(main, inputs) == outputs