Cucinami un hot dog! [chiuso]


13

A volte mi ritrovo a desiderare un hot dog (non tutti) e quindi ne faccio uno. Ora per fare un hot dog, è molto semplice.

1) Mettere i hot dog in acqua bollente

2) Attendere un certo periodo di tempo (dettagliato di seguito)

3) Mangia l'hot dog allo scadere del tempo.

Forse avrai notato che ho detto

certo tempo (dettagliato sotto)

e così farò dettaglio.

Molte marche diverse hanno molti consigli diversi per quanto tempo dovremmo cucinare gli hot dog, ma ho trovato meglio cucinarli esattamente per 4 minuti e 27 secondi (non chiedere). Ho provato molti timer diversi, ma ho scoperto che un programma che emette continuamente è il modo migliore per attirare la mia attenzione.

IL TUO COMPITO

Devi creare un programma che emetterà il messaggio Not ready yetesattamente per 4 minuti e 27 secondi. Trascorso questo tempo, è necessario eseguire l'outputEat your hot dog fino alla fine dei tempi. Per favore, non prendere alcun input.

COME VINCERE

È necessario scrivere il codice più breve in byte per vincere perché questo è un



1
Abbastanza vicino a Legen ... aspettalo ... anche.
arte

L'unica differenza è che questa sfida richiede che il programma attenda un determinato periodo di tempo
user41805

8
Dobbiamo emettere "Non ancora pronto" continuamente più e più volte fino a quando l'intervallo termina ( Not ready yet\nNot ready yet\n...) o possiamo semplicemente emetterlo una volta e cambiare l'output una volta terminati i 4m 27s?
user41805

1
Ops, la mia risposta mi ha ricordato di mangiare il mio hot dog negli ultimi due giorni ...
Neil

Risposte:


20

Scratch, 93 78 byte

image representation

Codice:

when gf clicked
say[Not ready yet
wait until<(timer)>[267
say[Eat your hot dog

Generato da https://scratchblocks.github.io/ , che sembra essere lo standard per il punteggio di Scratch.

Abbastanza autoesplicativo. All'avvio del programma, dire "Non ancora pronto" fino a quando il timer (che viene contato in secondi) è maggiore di 267. Quindi avvia un ciclo infinito dove dice Eat your hot dog.

Si è uscita continua, perché il sayblocco viene eseguito per sempre a meno che say []o sayqualcos'altro.


7
Non è necessario per sempre, risparmiando 8 byte. Questo porta a 85 byte. È anche più breve in Hñähñu (Mezquital Otomi) , anziché in inglese, di altri 8 byte (senza il per sempre), portandolo a soli 77 byte.
Tim


@Tim grazie, ma la bandiera verde non sembra funzionare.
Okx,

In realtà, ciò deriva dalla traduzione ufficiale da parte del sito Web, quindi è un bug che rende errato.
Tim

@Tim Il blocco della bandiera verde probabilmente non è stato ancora implementato (sebbene la traduzione lo traduca ancora). Inoltre, non esiste alcuna lingua Hñähñu in Scratch ufficiale.
Erik the Outgolfer,

14

Bash + coreutils, 50

timeout 267 yes Not ready yet
yes Eat your hot dog

Spiegazione

Penso abbastanza autoesplicativo, ma per ogni evenienza:

  • Il yes coreutil emette continuamente ripetutamente qualsiasi parametro passato ad esso sulla riga di comando
  • Il timeoutcoreutil accetta un parametro di timeout numerico seguito da un comando. Il comando viene eseguito, quindi interrotto dopo il timeout specificato.

8

Operazione linguaggio di scripting Flashpoint , 67 byte

#l
s="Not ready yet"
?_time>267:s="Eat your hot dog"
hint s
goto"l"

Salva come "hotdog.sqs"(o qualsiasi altra cosa) nella cartella della missione e chiama con [] exec "hotdog.sqs".

Spiegazione:

#l                                  // Label for the "goto"
s="Not ready yet"
?_time>267:s="Eat your hot dog"     // "?:" means "if () then" in a script.
                                    // "_time" is a local variable that is automatically
                                    // created and updated in every script. Its value
                                    // is the time in seconds since the script started.

hint s                              // Outputs the text in a text box.

~.1                                 // Sleeps for a tenth of a second.
                                    // The script seems to work without sleeping too,
                                    // so I didn't include this in the golfed version.
                                    // Looping in a script without sleeping is always
                                    // a bad idea, though. It sometimes crashes the game.

goto"l"                             // Go back to the beginning of the loop.
                                    // This is the only way to create a loop if you don't 
                                    // want to halt the game (and the time calculation)
                                    // until the loop finishes.

Ho provato molti timer diversi, ma ho scoperto che un programma che emette continuamente è il modo migliore per attirare la mia attenzione.

Questa soluzione dovrebbe essere particolarmente utile per attirare la tua attenzione, poiché il hintcomando riproduce un effetto sonoro aderente ogni volta che viene chiamato, il che suona molto fastidioso quando i suoni simultanei vengono troncati in un circuito stretto.


7

JavaScript ES6, 76 byte

$=>setInterval("console.log(--_>0?`Not ready yet`:`Eat your hot dog`)",_=517)

Spiegazione

Questo stampa qualcosa sulla console ogni 517 millisecondi. Inizialmente, stampa 'Not ready yet'e diminuisce il contatore. Dopo 517 iterazioni ( = 517 * 517 = 267289 ms), inizia la stampa 'Eat your hot dog'.

Test

f=
  $=>setInterval("console.log(--_>0?`Not ready yet`:`Eat your hot dog`)",_=517);
(setInterval("console.log('DONE NOW')",267000)&&f())();


non puoi semplicemente fare settimeout e salvare un byte?
user1910744

setTimeoutesegue la funzione solo una volta. La sfida consiste nell'output continuo di una stringa, pertanto non setTimeoutsarebbe valido.
Luca

(--_?funziona invece di (--_>0? (-2)
dandavis il

Sfortunatamente, non _verrà decrementato ogni volta che qualcosa viene stampato, quindi andrà anche sotto lo zero. Tutti gli interi negativi sono veritieri, quindi anche quelli che stamperebbero 'Not ready yet'(che non è quello che vogliamo).
Luca

7

Powershell, 85 71 59 byte

1..276|%{Sleep 1;'Not ready yet'};for(){'Eat your hot dog'}

Probabilmente c'è un modo molto migliore, quindi le critiche sono benvenute! Questo è il mio primo tentativo di golf :)

MODIFICARE un totale di 14 byte grazie ad AdmBorkBork! E sicuramente una tecnica da ricordare!

EDIT 2 Altri 12 byte persi grazie a Matt. Non chiamare scrivere due volte anche rimosso 2 spazi, molto utile!


1
Benvenuti in PPCG! Bello vedere un altro PowerSheller in giro. Un golf facile è quello di eseguire un ciclo un numero fisso di volte 1..276|%{}anziché un forciclo con un incremento. Dai un'occhiata anche ad altri suggerimenti su quella pagina!
AdmBorkBork,

Le stringhe vengono inviate a std out per impostazione predefinita. Non è necessario specificare con il write-outputcmdlet.
Matt,

7

Variante del linguaggio di scripting di GameMaker utilizzata nella mod Nuclear Throne Together, 68 byte

t=0while 1{trace(t++<8010?"Not ready yet":"Eat your hot dog")wait 1}

Spiegazione

  • Il parser di GML è deliziosamente indulgente. Il punto e virgola e le parentesi sono opzionali e il compilatore non è affatto preoccupato per la tua spaziatura al di fuori delle regole di base ( 0whileanalizza come 0, whilee quindi va bene)
  • Le variabili perdono nel contesto di esecuzione a meno che non vengano dichiarate via var(uguale a JS).
  • La variante GML utilizzata in NTT introduce un waitoperatore che spinge il "micro-thread" in esecuzione in un elenco per il numero specificato di frame, riprendendo in seguito. Coroutine, in sostanza.

    Il gioco ha un clock di 30 fps, quindi 4m27s == 267s == 8010 frame.

  • trace () restituisce la stringa specificata nella chat.

Se hai installato il videogioco + mod, puoi salvarlo come alcuni test.mod.gmle farlo /loadmod testper eseguirlo, inondando la chat di "rapporti sullo stato":

screenshot


3
Non sono esattamente sicuro di cosa stia succedendo qui, ma approvo.

3

Python 2, 92 byte

from time import*
t=time()
while 1:print"Not ready yet"if time()-t<267else"Eat your hot dog"

Provalo online!


9
while 1:print'ENaott yroeuard yh oyte td o g'[time()-t<267::2]per 90 byte
ovs

Anche @ovs while 1:print['Eat your hot dog','Not ready yet'][time()-t<267]sarebbe 90 (pur essendo più chiaro e non stampando lo spazio bianco extra).
Jonathan Allan,

3

TI-Basic, 75 byte

For(A,1,267
Disp "Not ready yet
Wait 1
End
While 1
Disp "Eat your hot dog
End

Spiegazione

For(A,1,267             # 9 bytes, for 267 times...
Disp "Not ready yet     # 26 bytes, display message
Wait 1                  # 3 bytes, and wait one second
End                     # 2 bytes, ...end
While 1                 # 3 bytes, after that, continuously...
Disp "Eat your hot dog  # 31 bytes, output second message
End                     # 1 byte, ...end

2

Lotto, 99 byte

@for /l %%t in (1,1,267)do @echo Not ready yet&timeout/t>nul 1
:l
@echo Eat your hot dog
@goto l

Il batch non ha aritmetica della data, quindi non è consentito un semplice timeout di 267 secondi, il massimo che posso fare è 267 timeout di un secondo.


2

C# 144 bytes

()=>{for(int i=0;;){var s="\nEat your hot dog";if(i<267e3){i++;s="\nNot ready yet";}System.Console.Write(s);System.Threading.Thread.Sleep(1);}};

Ungolfed full program:

class P
{
    static void Main()
    {
        System.Action a = () => 
            {
                for (int i = 0; ;)
                {
                    var s = "\nEat your hot dog";
                    if (i < 267e3)
                    {
                        i++;
                        s = "\nNot ready yet";
                    }
                    System.Console.Write(s);
                    System.Threading.Thread.Sleep(1);
                }
            };

        a();
    }
}

Unfortunately I could not use the ?:-operator as I have not found a way to stop incrementing i without the if.


Try something like if(i++<267e3) to save a few bytes.
adrianmp

1
@adrianmp: That wouldn't work, as that would still increment i every millisecond. And once int.MaxValue is reached the program would either crash or start printing Not ready yet again.
raznagul

I've managed to pull this off by greatly delaying the overflow (or even mitigating it at the cost of a few bytes). I've "borrowed" some ideas from your answer. Thanks!
adrianmp

2

C#, 174 172 147 bytes

Saved 25 bytes by "borrowing" some ideas from raznagul's C# answer and merging them with the sum of first n numbers trick!

Saved 2 bytes by using the sum of first n numbers trick for a loss of precision of 185 milliseconds.

class P{static void Main(){for(int i=1;;){System.Console.WriteLine(i++<731?"Not ready yet":"Eat your hot dog");System.Threading.Thread.Sleep(i);}}}

Ungolfed program:

class P
{
    static void Main()
    {
        for (int i=1;;)
        {
            System.Console.WriteLine( i++ < 731 ? "Not ready yet" : "Eat your hot dog");
            System.Threading.Thread.Sleep(i);
        }
    }
}

Explanation:

Since the total time to wait is hardcoded at 267 seconds, one can consider this number as a telescopic sum of the first n natural numbers, n * (n + 1) / 2, which must equal 267000 milliseconds.

This is equivalent to n^2 + n - 534000 = 0.

By solving this second order equation, n1 = 730.2532073142067, n2 = -n1. Of course, only the positive solution is accepted and can be approximated as 730.

The total time can be calculated as 730 * (730 + 1) / 2 = 266815 milliseconds. The imprecision is 185 milliseconds, imperceptible to humans. The code will now make the main (and only) thread sleeps for 1 millisecond, 2 milliseconds and so on up to 730, so the total sleep period is ~267 seconds.

Update:

La logica del programma può essere ulteriormente semplificata - in pratica deve visualizzare continuamente un messaggio e attendere un tempo specificato fino al passaggio al secondo messaggio.

Il messaggio può essere modificato utilizzando un operatore ternario per verificare il trascorrere del tempo specificato (~ 267 secondi).

L'aspetto del timing viene controllato utilizzando un contatore crescente e mettendo in pausa il thread di esecuzione.

Tuttavia, poiché la variabile contatore continua ad aumentare indefinitamente senza alcuna condizione per verificarne il valore, ci si può aspettare un overflow dei numeri interi in un determinato momento, quando il messaggio torna a Not ready yet.

È possibile aggiungere una condizione per rilevare e mitigare il problema assegnando un valore positivo maggiore di 730 quando si verifica l'overflow, come i=i<1?731:iall'interno del forloop. Purtroppo, ha un costo di 11 byte aggiuntivi:

class P{static void Main(){for(int i=1;;i=i<1?731:i){System.Console.Write(i++<731?"\nNot ready yet":"\nEat your hot dog");System.Threading.Thread.Sleep(i);}}}

La chiave qui sta usando il valore del contatore in millisecondi per ritardare notevolmente il momento dell'overflow.

Il tempo fino all'overflow può essere calcolato in base alla sum(1..n)formula, dove n = il valore intero con segno massimo a 32 bit in C # (e il framework .NET) o 2 ^ 31 - 1 = 2147483647:

2 147 483 647 * 2 147 483 648 / 2 = 2,305843008 x 10^18 milliseconds = 2,305843008 x 10^15 seconds = 26 687 997 779 days = ~73 067 755 years

Dopo 73 milioni di anni , potrebbe non importare se appare un difetto nel sistema: l'hot dog, l'OP affamato e forse la stessa razza umana sono scomparsi da tempo.


Versione precedente (172 byte):

namespace System{class P{static void Main(){for(int i=1;i<731;){Console.Write("\nNot ready yet");Threading.Thread.Sleep(i++);}for(;;)Console.Write("\nEat your hot dog");}}}

Programma non golfato:

namespace System
{
    class P
    {
        static void Main()
        {
            for (int i = 1; i < 731; )
            {
                Console.Write("\nNot ready yet");
                Threading.Thread.Sleep(i++);
            }
            for ( ; ; )
                Console.Write("\nEat your hot dog");
        }
    }
}

Versione precedente (174 byte):

namespace System{class P{static void Main(){for(int i=0;i++<267e3;){Console.Write("\nNot ready yet");Threading.Thread.Sleep(1);}for(;;)Console.Write("\nEat your hot dog");}}}

Programma non golfato:

namespace System
{
    class P
    {
        static void Main()
        {
            for (int i=0; i++ < 267e3; )
            {
                Console.Write("\nNot ready yet");
                Threading.Thread.Sleep(1);
            }
            for ( ; ; )
                Console.Write("\nEat your hot dog");
        }
    }
}

In alternativa, il programma può essere visualizzato Not ready yetuna sola volta, attendere fino al termine del tempo specificato e quindi essere emesso Eat your hot dogsovrascrivendo il messaggio precedente pur essendo più breve di qualche byte:

C #, 145 byte

namespace System{class P{static void Main(){Console.Write("Not ready yet");Threading.Thread.Sleep(267000);Console.Write("\rEat your hot dog");}}}

Programma non golfato:

namespace System
{
    class P
    {
        static void Main()
        {
            Console.Write("Not ready yet");
            Threading.Thread.Sleep(267000);
            Console.Write("\rEat your hot dog");
        }
    }
}

È fantastico. Ti darei +1, se non lo avessi già fatto. ;)
raznagul,

2

Rubino, 80 71 67 byte

Modifica: grazie a manatwork per la rasatura di 13 byte interi

267.times{puts"Not ready yet"
sleep 1}
loop{puts"Eat your hot dog"}

Why not 267.times{…}?
manatwork

Wow, thanks. I feel dumb now.
BRFNGRNBWS

Looks like you are counting with CR/LF line separators. As Ruby allows LF only, we used to count that only. And there is no need for the line break after the {. That would result 67 bytes.
manatwork

I'm a beginner at Ruby, and a total noob at code golfing, so thanks for all the help!
BRFNGRNBWS

In case you missed it, there is a collection of Tips for golfing in Ruby to help beginners.
manatwork

2

05AB1E, 43 29 28 bytes (Thanks to Adnan)

267F…€–Žä‡«ªw,}[“Eat€ž…ß‹·“,

Does not work online, since it times out. Offline it will work.

267F: Loop 267 times

…€–Žä‡«ª: First string with dictionary

w,: Wait one second and print

}[: End if loop and start infinite loop

“Eat€ž…ß‹·“: Second string with dictionary

,: Print


Thanks, my client saw that this code was short and works offline - now he wants me to write his website using this language. . .
Pascal Raszyk

It works online, but just not on the interpreter that is given online. You can see for yourself here
P. Knops

I know. It was a joke :D.
Pascal Raszyk

1
It's best to just answer the normal way :D
P. Knops

“NotŽä‡«“ can be replaced by …€–Žä‡«ª
Adnan

1

Python, 115 bytes

My first time trying something like this. I am also a beginner so here it goes in Python 3 for 115 bytes:

import time
for i in range(267):
    time.sleep(1)
    print("Not ready yet")
while 1:
    print("Eat your hotdog")

3
Welcome to the site! The aim of code golf is to write the shortest code possible in your language. There are a few things that can be improved and it couldn't hurt to look at the current Python winner for some tips!

Remove the time.sleep(1) - saves a few bytes
Pascal Raszyk

@praszyk, then the for will finish looping over range(267) much faster than 4 minutes 27 seconds and the solution becomes invalid. ☹
manatwork

1

JavaScript Blocks Editor for micro:bit, 90 Bytes

enter image description here

The code:

basic.showString("Not ready yet")
basic.pause(254000)
basic.showString("Eat your hot dog")

You can try it here.

Got inspired by the Scratch answer to solve the task with my micro:bit. The only Problem is that the pause-block starts after outputting the first string so i needed to reduce the pause by 13s.

Note: The old Microsoft Block Editor for micro:bit is shorter to create but produces more code so is in fact longer.


1

On the basis that the OP wants hotdogs continuously, until the end of time - which I understand from the phrase:

After this time has elasped, you should output Eat your hot dog until the end of time.

This is my answer:

C++, 187 188 224 167 bytes

Whitespace removed (167 bytes):

#include<stdio.h>
#include<windows.h>
int main(){for(;;){for(int x=0;x<267;x++){Sleep(1000);printf("Not ready yet");}Sleep(1000);printf("Eat your hot dog");}return 0;}

readable form (224 bytes):

#include <stdio.h>
#include <windows.h>

int main() {
  for( ; ; ){ 
    for(int x=0; x < 267; x++){
      Sleep(1000);
      printf("Not ready yet"); 
    }
    Sleep(1000);
    printf("Eat your hot dog");
  }
  return 0;
}

If, on the other hand, OP enjoys his hot dogs in moderation, then this is my answer:

Whitespace removed (158 bytes):

#include<stdio.h>
#include<windows.h>
int main(){for(int x=0;x<267;x++){Sleep(1000);printf("Not ready yet");}Sleep(1000);printf("Eat your hot dog");return 0;}

readable form (198 bytes):

#include <stdio.h>
#include <windows.h>

int main() {
  for(int x=0; x < 267; x++){
    Sleep(1000);
    printf("Not ready yet"); 
  }
  Sleep(1000);
  printf("Eat your hot dog");
  return 0;
}

What's delay?
Quentin

OK that's an old function. Replaced with Sleep(1000)
Tombas

You can get rid of a bunch of whitespace to save bytes. Also, I count 224 bytes, not 188.
HyperNeutrino

@HyperNeutrino you're right - I counted line endings but not leading whitespace. Edited accordingly (sorry I'm new at this!)
Tombas

@Quentin delay() is a function that I hoped could be lifted straight from Arduino... turns out that I can't! It did exist back in the day as part of the dos.h library, I understand.
Tombas

1

Excel VBA, 82 Bytes

Anonymous VBE immediates window function that takes no input and outputs whether or not you should eat your hot dog to cell [A1].

d=Now+#0:4:27#:Do:[A1]=IIf(Now<d,"Not ready yet","Eat your hot dog"):DoEvents:Loop

1
Interesting I didn't knew you can run the program directly from Immediate window
Stupid_Intern

1

Excel VBA 122 94 bytes

Sub p()
e=Now+#0:4:27#
Do
[a1]=IIf(Now<e,"Not ready yet","Eat your hot dog")
Loop
End Sub

Thanks Taylor Scott


You can cut down this solution quite a bit, CDate("00:04:28") can be condensed to #0:4:27#, you can replace your While ... Wend loop with a Do .. Loop Loop and you can replace your if clause with an iif clause
Taylor Scott

@TaylorScott Yes thanks :)
Stupid_Intern

1
@TaylorScott is there any alternative for msgbox ?
Stupid_Intern

1
@TaylorScott also iif clause is not working with msgbox I am not sure why and #0:4:27# autoformats to a date not time you are free to edit the answer if you want
Stupid_Intern

1
Actually because VBA does not have any STDIN or STDOUT, there are a lot of options available to you, such as the VBE immediates window and to cells in excel, you can see more about this at codegolf.stackexchange.com/a/107216/61846
Taylor Scott

0

Javascript, 83 Bytes

d=Date.now()
while(1)alert(Date.now()-d<267000?"Not ready yet":"Eat your hot dog"))

Alertz for everyone!


1
You can change 267000 to 267e3 and save a byte.
powelles

From the question: "You have to make a program". This is not a program or a function, but a snippet.
Luke

7
This is a program.
programmer5000

1
You can save a few bytes by using new Date in place of Date.now(), and another few by using for(d=new Date;;)alert...
ETHproductions

2
alert() halts the program until the user closes and the challenge bans input
dandavis

0

PERL, 76 bytes

$|++;
for(1..247){print'Not ready yet';sleep 1};print "Eat your hot dog";for(;;){}

6
I count 82 bytes.
Oliver

0

PHP 88 bytes

<?$t=0;do{$t++;echo "Not ready yet";sleep(1);} while ($t<267);echo "Eat your hotdog";?>

1
“After this time has elasped, you should output Eat your hot dog until the end of time.” So you have to repeat the 2nd message too. That will add to its length, but fortunately there is place to shorten it: for($t=267;$t--;sleep(1))echo"Not ready yet";for(;;)echo"Eat your hotdog";. By the way, running code with php -r is accepted, so no need for the PHP tags (especially not the closing one, which is considered bad habit in that case: “The closing ?> tag MUST be omitted from files containing only PHP” – PSR-2).
manatwork

1
@manatwork untested: for($t=267;;sleep(1))echo $t-->0?"Not ready yet":"Eat your hotdog";
diynevala

Interesting one, @diynevala. According to the documentation, “If PHP encounters a number beyond the bounds of the integer type, it will be interpreted as a float instead. Also, an operation which results in a number beyond the bounds of the integer type will return a float instead.” – Integer overflow, so that condition should work correctly until the end of time.
manatwork

@manatwork Also sleeps for 1 second between outputs even after 267 seconds.
diynevala

0

REXX, 82 bytes

do forever
if time(e)<267 then say 'Not ready yet'
else say 'Eat your hot dog'
end

0

Java 7, 152 bytes

void c(){for(long s=System.nanoTime(),e=s+(long)267e9;s<e;s=System.nanoTime())System.out.println("Not ready yet");System.out.print("Eat your hot dog");}

Explanation:

void c(){                                 // Method
  for(                                    //  Loop
      long s=System.nanoTime(),           //    Current time in nanoseconds as start
      e=s+(long)267e9;                    //    End time (267 seconds later)
      s<e;                                //    Loop as long as we haven't reached the end time
      s=System.nanoTime())                //    After every iteration get the new current time in nanoseconds
    System.out.println("Not ready yet");  //   Print "Not ready yet" as long as we loop
                                          //  End of loop (implicit / single-line body)
  System.out.print("Eat your hot dog");   //  Print "Eat your hot dog"
}                                         // End of method

0

PHP, 68 bytes

for($t=268;$t--;sleep(1))echo$t?"Not ready yet←":"Eat your hot dog";

continuous output; is ASCII 10 = LF. Run with -r.

one-time output, 50 bytes

Not ready yet<?sleep(267);echo"←Eat your hot dog";

where is ASCII 13 = CR. Save to file or use piping to run.


0

RBX.Lua, 69 bytes

for i=1,267 do print"Not ready yet"Wait(1)end;print"Eat your hot dog"

RBX.Lua is the language used on ROBLOX.com. It is a modified version of Lua 5.1 that features a built-in 'Wait' function. The above code is pretty self-explanatory, below is a more readable version:

for i = 1, 267 do
    print("Not ready yet");
    Wait(1);
end

print("Eat your hot dog");

The code outputs "Not ready yet" continuously into STDOUT, for 267 seconds (4 minutes 27 seconds) before outputting "Eat your hot dog".


0

C - 130 bytes

It could be slightly shorter (128bytes), but I thought it neater to overwrite "Not ready yet"

#include<stdio.h>
#include<unistd.h>
int main(){printf("Not ready yet");fflush(stdout);sleep(267);printf("\rEat your hot dog\n");}

Welcome on the site! You can omit #include<unistd.h> (it will emit a warning but still compile). Doing as you do (overwriting the previous message) is your right, but since the challenge doesn't really ask for it, I'd suggest not to do it. It would allow you to do int main(){puts("Not ready yet");sleep(267);puts("Eat your hot dog");} (with no includes, they aren't needed) - but no obligation to do it of course.
Dada

-1

VBA,126 Bytes

sub hd()
Debug.print "Not ready Yet"
application.wait(now+timevalue(00:04:27))
Debug.print "Eat your hot dog"
end sub

1
Doesn't do what the challenge asked for.
Matthew Roh

-1

Python 2.7, 90 88 bytes

import time;exec"print'Not ready yet';time.sleep(1);"*267;while 1:print"Eat your hotdog"

I don't get why someone -1'd my answer. can some1 explain? :(
Koishore Roy
Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.