#!/usr/bin/env python
test_cases = int(raw_input())
for i in range(test_cases):
x, y = map(int, raw_input().split())
for i in range(y):
if_true = False
for a in range(x):
if if_true == False:
print "*",
if_true = True
continue
elif if_true == True:
print ".",
if_true = False
continue
print; print
这是基本问题集的问题3的代码。它被称为角色模式(Act 1)。我得到第一个raw_input的EOF错误,在ideone中,我看不到网站的输入......
Traceback (most recent call last):
File "prog.py", line 4, in <module>
EOFError: EOF when reading a line