+ 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
13 Answers
+ 7
which of your codes?plus this isn't what challenges are
+ 5
ok, then who was the winner?
+ 4
I am the first 3 views of 2018
+ 4
when starts 2018 in New Zeland
+ 4
@Georgiana: it certainly was not me; I was drinking champaign...🍸
best wishes to you all!
+ 3
since a few hours. check following code
https://code.sololearn.com/cS3MjIVoa6my/?ref=app
+ 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.
+ 2
I had tweaked your code a bit, and it's output said I am number 00004 to run it in 2018.
+ 2
then probably chessmaster is telling the truth, but maybe we should call him 'cheatmaster' ;-)
+ 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...
+ 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.
+ 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...