QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#674281#9255. Python ProgrammzyxRE 0ms0kbPython31.3kb2024-10-25 14:55:462024-10-25 14:55:51

Judging History

你现在查看的是最新测评结果

  • [2024-10-25 14:55:51]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:0kb
  • [2024-10-25 14:55:46]
  • 提交

answer

l1 = input()
l2 = input()
l3 = input()
l4 = input()
l5 = input()

l2 = l2.split(' ')
l3 = l3.split(' ')

if l2[0] == '':
	del l2[0]
if l3[0] == '':
	del l3[0]

i = l2[1]
j = l3[1]

s = len(l2[3])
ss = ''
ml1 = []

for x in range(6, s):
	if l2[3][x] != ',' and l2[3][x] != ')':
		ss += l2[3][x]
	else:
		ml1.append(ss)
		ss = ''

ss = ''
ml2 = []
s = len(l3[3])
for x in range(6, s):
	if l3[3][x] != ',' and l3[3][x] != ')':
		ss += l3[3][x]
	else:
		ml2.append(ss)
		ss = ''

if len(ml1) == 2:
	ml1.append('1')
a, b, c = int(ml1[0]), int(ml1[1]), int(ml1[2])

if len(ml2) == 2:
	ml2.append('1')
t = str(int(ml2[0] == i)) + str(int(ml2[1] == i)) + str(int(ml2[2] == i))

ans = 0
for x in range(a, b, c):
	if t == '000':
		for y in range(int(ml2[0]), int(ml2[1]), int(ml2[2])):
			ans += y
	if t == '001':
		for y in range(int(ml2[0]), int(ml2[1]), x):
			ans += y
	if t == '010':
		for y in range(int(ml2[0]), x, int(ml2[2])):
			ans += y
	if t == '100':
		for y in range(x, int(ml2[1]), int(ml2[2])):
			ans += y
	if t == '110':
		for y in range(x, x, int(ml2[2])):
			ans += y
	if t == '101':
		for y in range(x, int(ml2[1]), x):
			ans += y
	if t == '011':
		for y in range(int(ml2[0]), x, x):
			ans += y
	if t == '111':
		for y in range(x, x, x):
			ans += y

print(ans)

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Dangerous Syscalls

input:

ans=0
for a in range(1,3):
    for b in range(5,1,-2):
        ans+=b
print(ans)

output:


result: