+ 6

Challenge: be the first in 2018 to run my code!

Challenge: be the first in 2018 to run my code! Run this code, and see whether you are the first to run this code in 2018. Note: everytime this code is run, the counter will increase, only in 2018, it will be resetted to 0. Also note that it uses your local time, so sorry, everybody not from new-zealand; the chance that you will be the first is reduced... https://code.sololearn.com/WD1U4le1QAXP/?ref=app

30th Dec 2017, 10:59 PM
ReneDaanen
13 Answers
+ 7
which of your codes?plus this isn't what challenges are
30th Dec 2017, 11:01 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 5
ok, then who was the winner?
1st Jan 2018, 8:04 PM
Georgiana
Georgiana - avatar
+ 4
I am the first 3 views of 2018
30th Dec 2017, 11:09 PM
ChessMaster
ChessMaster - avatar
+ 4
when starts 2018 in New Zeland
31st Dec 2017, 11:04 AM
Amadeus
Amadeus - avatar
+ 4
@Georgiana: it certainly was not me; I was drinking champaign...🍸 best wishes to you all!
1st Jan 2018, 8:31 PM
ReneDaanen
+ 3
since a few hours. check following code https://code.sololearn.com/cS3MjIVoa6my/?ref=app
31st Dec 2017, 12:49 PM
ReneDaanen
+ 2
@Brains: Sorry, you were too quick: I hadn't inserted the link yet; now it is. And I think that, although it is not a coding-challenge, it still will be a challenge to be the first to run it in 2018, especially when living in The Netherlands, like me.
30th Dec 2017, 11:11 PM
ReneDaanen
+ 2
I had tweaked your code a bit, and it's output said I am number 00004 to run it in 2018.
30th Dec 2017, 11:20 PM
Paul
Paul - avatar
+ 2
then probably chessmaster is telling the truth, but maybe we should call him 'cheatmaster' ;-)
30th Dec 2017, 11:24 PM
ReneDaanen
+ 2
As far as I know, in Sololearn playground, there is not a possibility to use server-side programming, nor do I have the possibility to do this outside of sololearn, so I was not able to make it 'cheat-proof'. Obviously, it would have been a 'black box' that way, making it not very much fun for you guys...
30th Dec 2017, 11:29 PM
ReneDaanen
+ 2
@ReneDaanen, I don't understand your logic about local time and New Zeeland. I think the "official" 2018 start time is given by your local time (Netherlands) when you will reset the condition. So, the one who will run the code immediately after (the condition is set with 2018 in the code) will be the first, even if his local time will be 2 am already.
31st Dec 2017, 9:01 AM
Georgiana
Georgiana - avatar
+ 2
@Georgiana: no: if you look at the code, it will get the year of current date. As this code is run client-side, this will be the year in your current time. if this year is 2017, it will show you (and increase) the counter of 2017. If your local year is not 2017, it will show you (and increase) a second counter. I did not reset any counter, at 00:00 my local time...
1st Jan 2018, 12:40 AM
ReneDaanen