+ 5

[ Challenge 4 ] The Great Kian

The great Kian is looking for a smart prime minister. He's looking for a guy who can solve the OLP (Old Legendary Problem). OLP is an old problem (obviously) that no one was able to solve it yet Given the sequence a1, a2, ..., an find the three values a1 + a4 + a7 + ..., a2 + a5 + a8 + ... and a3 + a6 + a9 + ...(these summations go on while the indexes are valid SAMPLE INPUT 5 1 2 3 4 5 SAMPLE OUTPUT 5 7 3 explanation 1+4 = 5 2+5 =7 3

19th Dec 2017, 4:08 AM
Ronak Pareek
Ronak Pareek - avatar
6 ответов
19th Dec 2017, 11:14 AM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 13
I'm early!! Python One-linear Just enter the number, example : 12345 https://code.sololearn.com/cI5xaYgxJ4Fk/?ref=app
19th Dec 2017, 7:00 AM
Justine Ogaraku
Justine Ogaraku - avatar
19th Dec 2017, 2:49 PM
LukArToDo
LukArToDo - avatar
+ 4
https://code.sololearn.com/Wq9TPUtikxAz/?ref=app
20th Dec 2017, 9:12 PM
Luc Hariman Randrianomenjanahary
Luc Hariman Randrianomenjanahary - avatar
28th Jun 2018, 2:30 PM
Gayatri soni