← Back to topics
Topic

jabuka

N
Nikola94
i don't know what's wrong with my code. 8/10 tests pass...

http://www.z-trening.com/submit.php?submit=7100068547&subm_code=1

can someone tell me what's wrong ?
N
Nikola94
when i put longint i get tle so that's not the answer...
d
dario-dsa
try input this 1000000000 1000000000
your program should print this:
1 1000000000 1000000000
2 500000000 500000000
4 250000000 250000000
5 200000000 200000000
8 125000000 125000000
10 100000000 100000000
16 62500000 62500000
20 50000000 50000000
25 40000000 40000000
32 31250000 31250000
40 25000000 25000000
50 20000000 20000000
64 15625000 15625000
80 12500000 12500000
100 10000000 10000000
125 8000000 8000000
128 7812500 7812500
160 6250000 6250000
200 5000000 5000000
250 4000000 4000000
256 3906250 3906250
320 3125000 3125000
400 2500000 2500000
500 2000000 2000000
512 1953125 1953125
625 1600000 1600000
640 1562500 1562500
800 1250000 1250000
1000 1000000 1000000
1250 800000 800000
1280 781250 781250
1600 625000 625000
2000 500000 500000
2500 400000 400000
2560 390625 390625
3125 320000 320000
3200 312500 312500
4000 250000 250000
5000 200000 200000
6250 160000 160000
6400 156250 156250
8000 125000 125000
10000 100000 100000
12500 80000 80000
12800 78125 78125
15625 64000 64000
16000 62500 62500
20000 50000 50000
25000 40000 40000
31250 32000 32000
32000 31250 31250
40000 25000 25000
50000 20000 20000
62500 16000 16000
64000 15625 15625
78125 12800 12800
80000 12500 12500
100000 10000 10000
125000 8000 8000
156250 6400 6400
160000 6250 6250
200000 5000 5000
250000 4000 4000
312500 3200 3200
320000 3125 3125
390625 2560 2560
400000 2500 2500
500000 2000 2000
625000 1600 1600
781250 1280 1280
800000 1250 1250
1000000 1000 1000
1250000 800 800
1562500 640 640
1600000 625 625
1953125 512 512
2000000 500 500
2500000 400 400
3125000 320 320
3906250 256 256
4000000 250 250
5000000 200 200
6250000 160 160
7812500 128 128
8000000 125 125
10000000 100 100
12500000 80 80
15625000 64 64
20000000 50 50
25000000 40 40
31250000 32 32
40000000 25 25
50000000 20 20
62500000 16 16
100000000 10 10
125000000 8 8
200000000 5 5
250000000 4 4
500000000 2 2
1000000000 1 1
N
Nikola94
it takes 30 seconds to execute...how to make it faster (very faster) ?
F
FilipKeri
you can go just to sqrt of number [[R]]
N
Nikola94
thx, now it passed...