CSES - Putka Open 2015 – 3/6 - Results
Submission details
Task:Onnenluku
Sender:
Submission time:2015-09-12 20:15:28 +0300
Language:Python3
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
#30
Test results
testverdicttimegroup
#10.19 s1details
#20.17 s1details
#30.17 s1details
#40.16 s1details
#50.16 s1details
#6--2details
#7--2details
#8--2details
#9--2details
#10--2details
#11--3details
#12--3details
#13--3details
#14--3details
#15--3details

Code

def onnenluku(n):
	if "0" in n:
		return False
	luvut=[]
	for i in n:
		if len(luvut)>2:
			return False
		if i not in luvut:
			luvut.append(i)
		elif i in luvut:
			continue
	if len(luvut) > 2:
		return False
	return True		
maara=0
luku1, luku2 = [int(x) for x in input().split(" ")]
for i in range(luku1, luku2+2):
	if onnenluku(str(i)):
		maara+=1
print(maara-2)

Test details

Test 1

Group: 1

Verdict:

input
2157 93337

correct output
1421

user output
1435

Test 2

Group: 1

Verdict:

input
4875 95124

correct output
1278

user output
1289

Test 3

Group: 1

Verdict:

input
5577 96352

correct output
1245

user output
1255

Test 4

Group: 1

Verdict:

input
8362 92950

correct output
1076

user output
1084

Test 5

Group: 1

Verdict:

input
5658 96660

correct output
1238

user output
1248

Test 6

Group: 2

Verdict:

input
51312303535233 994542403556353

correct output
1453976

user output
(empty)

Test 7

Group: 2

Verdict:

input
25636920452341 934558290712847

correct output
1544072

user output
(empty)

Test 8

Group: 2

Verdict:

input
7917952071965 985207415843573

correct output
1763176

user output
(empty)

Test 9

Group: 2

Verdict:

input
48991581181227 907034837225965

correct output
1380248

user output
(empty)

Test 10

Group: 2

Verdict:

input
47968703305149 924246001328437

correct output
1396632

user output
(empty)

Test 11

Group: 3

Verdict:

input
292953755324413237753216241025...

correct output
53286731528535944

user output
(empty)

Test 12

Group: 3

Verdict:

input
373990979330820426927419348165...

correct output
51580289482227600

user output
(empty)

Test 13

Group: 3

Verdict:

input
701417326319476057561825658890...

correct output
42924933948374952

user output
(empty)

Test 14

Group: 3

Verdict:

input
177202883511434557056457305647...

correct output
54500592365600640

user output
(empty)

Test 15

Group: 3

Verdict:

input
977665117437419620152569155919...

correct output
38562071809359800

user output
(empty)