Code Submission Evaluation System Login

Datatähti 2016 alku

Start:2015-09-28 00:00:00
End:2015-10-12 00:00:00
 

Tasks | Scoreboard | Statistics


CSES - Datatähti 2016 alku - Results
History
2015-09-29 13:05:41100
2015-09-29 13:01:5139
2015-09-29 13:00:550
2015-09-29 12:56:2239
2015-09-29 12:55:4839
2015-09-29 12:50:1539
2015-09-29 12:43:0139
2015-09-29 01:17:210
2015-09-29 01:15:450
2015-09-29 01:07:440
2015-09-29 01:04:470
2015-09-29 01:03:180
2015-09-29 01:02:430
2015-09-29 00:20:0012
Task:Osajono
Sender:Allu
Submission time:2015-09-29 01:02:43
Language:Python3
Status:READY
Score:0

Feedback

groupverdictscore
#1WRONG ANSWER0
#2WRONG ANSWER0
#3TIME LIMIT EXCEEDED0

Test results

testverdicttime (s)group
#1WRONG ANSWER0.07 / 1.001details
#2RUNTIME ERROR0.07 / 1.001details
#3WRONG ANSWER0.08 / 1.001details
#4WRONG ANSWER0.08 / 1.001details
#5WRONG ANSWER0.08 / 1.001details
#6WRONG ANSWER0.08 / 1.002details
#7WRONG ANSWER0.09 / 1.002details
#8WRONG ANSWER0.09 / 1.002details
#9WRONG ANSWER0.09 / 1.002details
#10WRONG ANSWER0.09 / 1.002details
#11TIME LIMIT EXCEEDED-- / 1.003details
#12WRONG ANSWER0.31 / 1.003details
#13TIME LIMIT EXCEEDED-- / 1.003details
#14TIME LIMIT EXCEEDED-- / 1.003details
#15TIME LIMIT EXCEEDED-- / 1.003details

Code

def f(n):
	if n == 1:
		return 0
	s=1
	for i in range(1, n+1):
		s*=i
	return s

inp = input()
num = len(inp)
d = {}
l = ""

for a in inp:
	if a in l:
		d[a] += 1
	else:
		d[a] = 1
		l += a

print(d)

for n in d.values():
	num += f(n) / (2 * f(n-2))

print (num)

Test details

Test 1

Group: 1

Verdict: WRONG ANSWER

input
BBBAABBBAAAABBAAAABAABAABBBBBB...
view   save

correct output
2554

view   save

user output
{'B': 52, 'A': 48}
2554.0

view   save

Test 2

Group: 1

Verdict: RUNTIME ERROR

input
GDFVYWQCZAFGICSXOSWBZMGPDBSSVL...
view   save

correct output
299

view   save

user output
{'J': 1, 'W': 7, 'A': 2, 'Q': ...
view   save

Error:
Traceback (most recent call last):
  File "input/code.py", line 24, in <module>
    num += f(n) / (2 * f(n-2))
ZeroDivisionError: division by zero

Test 3

Group: 1

Verdict: WRONG ANSWER

input
AAAAAAAAAAAAAAAAAAAAAAAAAZAAAA...
view   save

correct output
4314

view   save

user output
{'A': 92, 'Z': 8}
4314.0

view   save

Test 4

Group: 1

Verdict: WRONG ANSWER

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
view   save

correct output
4231

view   save

user output
{'Z': 9, 'A': 91}
4231.0

view   save

Test 5

Group: 1

Verdict: WRONG ANSWER

input
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ...
view   save

correct output
5050

view   save

user output
{'Q': 100}
5050.0

view   save

Test 6

Group: 2

Verdict: WRONG ANSWER

input
BBABABBBABBAABBABBABAABAAABABA...
view   save

correct output
6253029

view   save

user output
{'B': 2523, 'A': 2477}
6253029.0

view   save

Test 7

Group: 2

Verdict: WRONG ANSWER

input
RBKJMLDVQMKHYKCNDIVVKOMFUXTFMG...
view   save

correct output
485173

view   save

user output
{'N': 197, 'L': 185, 'K': 185,...
view   save

Test 8

Group: 2

Verdict: WRONG ANSWER

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
view   save

correct output
12427725

view   save

user output
{'Z': 15, 'A': 4985}
12427725.0

view   save

Test 9

Group: 2

Verdict: WRONG ANSWER

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
view   save

correct output
12467549

view   save

user output
{'A': 4993, 'Z': 7}
12467549.0

view   save

Test 10

Group: 2

Verdict: WRONG ANSWER

input
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ...
view   save

correct output
12502500

view   save

user output
{'Q': 5000}
12502500.0

view   save

Test 11

Group: 3

Verdict: TIME LIMIT EXCEEDED

input
BAAAAABABBABAABAABABABBBABBAAB...
view   save

correct output
2500051369

view   save

user output
(empty)

Test 12

Group: 3

Verdict: WRONG ANSWER

input
ABBURXDRVXAYBPXXOQZNYHLWGUEEWR...
view   save

correct output
192407124

view   save

user output
{'C': 3895, 'Y': 3916, 'D': 38...
view   save

Test 13

Group: 3

Verdict: TIME LIMIT EXCEEDED

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
view   save

correct output
4998050400

view   save

user output
(empty)

Test 14

Group: 3

Verdict: TIME LIMIT EXCEEDED

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
view   save

correct output
4998850144

view   save

user output
(empty)

Test 15

Group: 3

Verdict: TIME LIMIT EXCEEDED

input
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ...
view   save

correct output
5000050000

view   save

user output
(empty)