0% found this document useful (0 votes)
3 views7 pages

Spaceship Movement Calculation Contest

In 2048, humanity mines rare minerals from asteroids using fleets of autonomous spaceships, which require sophisticated algorithms for safe navigation. The document outlines a contest involving the calculation of time taken for various spaceship movement sequences based on given paces. Participants must compute the total time for each sequence and submit their results on a coding contest platform.

Uploaded by

Bogdan Gabor
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views7 pages

Spaceship Movement Calculation Contest

In 2048, humanity mines rare minerals from asteroids using fleets of autonomous spaceships, which require sophisticated algorithms for safe navigation. The document outlines a contest involving the calculation of time taken for various spaceship movement sequences based on given paces. Participants must compute the total time for each sequence and submit their results on a coding contest platform.

Uploaded by

Bogdan Gabor
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Spaceship

u too? [Link]/career
#WeLoveSoftware

#WeLoveSoftware
u too? [Link]/career
In 2048…
… humanity started mining rare minerals from the vast asteroid
belt situated between Mars and Jupiter, to fuel even more ambitious
engineering projects. To accomplish this, fleets of autonomous
spaceships were deployed, tirelessly shuttling precious resources
from asteroid mining sites back to an advanced space station
nearby.

Ensuring a safe return requires not just sophisticated technology,


but also ingenious algorithms capable of plotting routes through the
most treacherous environment known to humankind.
Level 1

u too? [Link]/career
#WeLoveSoftware

LEVEL 1

#WeLoveSoftware
u too? [Link]/career
LEVEL 1
This contest is about steering
a spaceship. The movement of a
spaceship is described using pace.
My average pace
is 5 minutes
per kilometer

Contrary to velocity, pace is time


divided by distance.
▪ You are given a list of movement sequences of a spaceship
▪ A movement sequence is a list of paces
▪ A pace is represented by an integer
− "5" takes 5 units of time and moves 1 unit of space
− "4" takes 4 units of time and moves 1 unit of space
▪ For each sequence, calculate the time it takes to complete
▪ All integers will be greater than 0

LEVEL 1

LEVEL 1
Input
Name Description Example

N Number of sequences 3
5 5
Sequence 5 4 4 4 5
A list of integers separated by spaces, each representing a pace 5 4 3 2 3 4 5
(repeated N times)

Output
Name Description Example

10
22
Time 26
The time it takes the sequence to complete
(repeated N times)

For each input file, calculate the output and write it in a file.
Upload your output file to the coding contest platform.
Good Luck!

u too? [Link]/career
#WeLoveSoftware

#WeLoveSoftware
u too? [Link]/career

You might also like