QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#559391#5129. Equalising Audiojoshua_125RE 52ms21564kbPython3224b2024-09-11 21:50:182024-09-11 21:50:24

Judging History

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

  • [2024-09-11 21:50:24]
  • 评测
  • 测评结果:RE
  • 用时:52ms
  • 内存:21564kb
  • [2024-09-11 21:50:18]
  • 提交

answer

from math import sqrt

n, x = [int(k) for k in input().split()]
a = [int(k) for k in input().split()]

sum = sum([int(k)**2 for k in a])

factor = sqrt((n*x)/sum)

answer = [str(factor*k) for k in a]

print(" ".join(answer))

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 9ms
memory: 10828kb

input:

5 6
0 1 -2 3 -4

output:

0.0 1.0 -2.0 3.0 -4.0

result:

ok 5 numbers

Test #2:

score: 0
Accepted
time: 10ms
memory: 10652kb

input:

4 1
1 3 3 7

output:

0.24253562503633297 0.7276068751089989 0.7276068751089989 1.6977493752543307

result:

ok 4 numbers

Test #3:

score: 0
Accepted
time: 11ms
memory: 10732kb

input:

1 0
-1000000

output:

-0.0

result:

ok found '-0.0000000', expected '-0.0000000', error '-0.0000000'

Test #4:

score: 0
Accepted
time: 14ms
memory: 10824kb

input:

1 1000000
-1000000

output:

-1000.0

result:

ok found '-1000.0000000', expected '-1000.0000000', error '-0.0000000'

Test #5:

score: 0
Accepted
time: 8ms
memory: 10684kb

input:

1 1000000
1000000

output:

1000.0

result:

ok found '1000.0000000', expected '1000.0000000', error '0.0000000'

Test #6:

score: 0
Accepted
time: 52ms
memory: 21564kb

input:

100000 1000000
1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 10000...

output:

1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0...

result:

ok 100000 numbers

Test #7:

score: -100
Dangerous Syscalls

input:

100000 1000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:


result: