Displaying minutes in HH:MM formatCodeChef - Please like meHackerEarth Challenge Find Maximum Taste of Fruits“Angry Professor” Python implementationSeven-segment display GUINo more filthy wordsA class to store the number of seconds since midnightAlternating CharactersHackerEarth problem : number of occurrences of a number in the arrayGetting the Sum of Discounted Price

Solve this icositetragram

Using GNU screen, I get raw prompt with backslashes

Why is k-means used for non normally distributed data?

Divide Numbers by 0

Are there any writings by blinded and/or exiled Byzantine emperors?

One hour 10 min layover in Newark; International -> Domestic connection. Enough time to clear customs?

Can my UK debt be collected because I have to return to US?

How could reincarnation magic be limited to prevent overuse?

Why does dough containing a small amount of terumah become exempt from challah?

Why did the VIC-II and SID use 6 µm technology in the era of 3 µm and 1.5 µm?

How does Harry wear the invisibility cloak?

Does the size of capers influence their taste?

Is mathematics truth?

Visiting girlfriend in the USA

Map a function that takes arguments in different levels of a list

Would there be balance issues if I allowed opportunity attacks against any creature, not just hostile ones?

FHE: What is the difference between multiplicative depth and multiplicative level?

Is it rude to ask my opponent to resign an online game when they have a lost endgame?

Meaning of "offen balkon machen"?

How to disambiguate between various meditation practices?

Does secure hashing imply secure symmetric encryption?

Displaying minutes in HH:MM format

Playing boules... IN SPACE!

Why are Latin and Sanskrit called dead languages?



Displaying minutes in HH:MM format


CodeChef - Please like meHackerEarth Challenge Find Maximum Taste of Fruits“Angry Professor” Python implementationSeven-segment display GUINo more filthy wordsA class to store the number of seconds since midnightAlternating CharactersHackerEarth problem : number of occurrences of a number in the arrayGetting the Sum of Discounted Price






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








10












$begingroup$


This program is a clock that only displays minutes passed since midnight. This program is supposed to be really simple but because of some "aesthetic bug", I wrote quite a lot if-else statements that I think can be simplified.





Format Input



The first line will contain an integer T, the number of test cases.
Each test case will contain an number N, the number displayed by the
strange clock.



Format Output



For each test case, print “Case X: “ (X starts with 1) and then print
what time it is in 24 hours HH:MM format.



Constraints



1 <= T <= 1000



0 <= N <= 1439




#include <stdio.h>

int main()

int T;
scanf("%d", &T);

for (int i = 1; i <= T; i++)

int N;
scanf("%d", &N);

int hours = N / 60;
int minutes = N % 60;

printf("Case #%d: ", i);

if (N < 10)
printf("00:0%dn", N);
else if (N > 10 && N < 60)
printf("00:%dn", N);
else if (N > 60 && N < 600)
if (minutes == 0)
printf("0%d:00n", hours);
else if (minutes > 0 && minutes < 10)
printf("0%d:0%dn", hours, minutes);
else
printf("0%d:%dn", hours, minutes);

else
if (minutes == 0)
printf("%d:00n", hours);
else if (minutes > 0 && minutes < 10)
printf("%d:0%dn", hours, minutes);
else
printf("%d:%dn", hours, minutes);













share|improve this question









New contributor



Elvan Selvano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






$endgroup$













  • $begingroup$
    As I understand it, N is the number the clock must display, I.e. when N=1439, the clock should display 14:39. You should divide by 100 and not 60.
    $endgroup$
    – Édouard
    13 hours ago










  • $begingroup$
    @Édouard since a day has 1440 minutes, it's more likely that N is the number of minutes since midnight. This crucial information is missing from the instructions, which probably prepares the students to real-life situations, which are very similar.
    $endgroup$
    – Roland Illig
    3 hours ago










  • $begingroup$
    Or, the instructions may have included the definition of the "strange clock", and Elvan just didn't post this part.
    $endgroup$
    – Roland Illig
    3 hours ago

















10












$begingroup$


This program is a clock that only displays minutes passed since midnight. This program is supposed to be really simple but because of some "aesthetic bug", I wrote quite a lot if-else statements that I think can be simplified.





Format Input



The first line will contain an integer T, the number of test cases.
Each test case will contain an number N, the number displayed by the
strange clock.



Format Output



For each test case, print “Case X: “ (X starts with 1) and then print
what time it is in 24 hours HH:MM format.



Constraints



1 <= T <= 1000



0 <= N <= 1439




#include <stdio.h>

int main()

int T;
scanf("%d", &T);

for (int i = 1; i <= T; i++)

int N;
scanf("%d", &N);

int hours = N / 60;
int minutes = N % 60;

printf("Case #%d: ", i);

if (N < 10)
printf("00:0%dn", N);
else if (N > 10 && N < 60)
printf("00:%dn", N);
else if (N > 60 && N < 600)
if (minutes == 0)
printf("0%d:00n", hours);
else if (minutes > 0 && minutes < 10)
printf("0%d:0%dn", hours, minutes);
else
printf("0%d:%dn", hours, minutes);

else
if (minutes == 0)
printf("%d:00n", hours);
else if (minutes > 0 && minutes < 10)
printf("%d:0%dn", hours, minutes);
else
printf("%d:%dn", hours, minutes);













share|improve this question









New contributor



Elvan Selvano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






$endgroup$













  • $begingroup$
    As I understand it, N is the number the clock must display, I.e. when N=1439, the clock should display 14:39. You should divide by 100 and not 60.
    $endgroup$
    – Édouard
    13 hours ago










  • $begingroup$
    @Édouard since a day has 1440 minutes, it's more likely that N is the number of minutes since midnight. This crucial information is missing from the instructions, which probably prepares the students to real-life situations, which are very similar.
    $endgroup$
    – Roland Illig
    3 hours ago










  • $begingroup$
    Or, the instructions may have included the definition of the "strange clock", and Elvan just didn't post this part.
    $endgroup$
    – Roland Illig
    3 hours ago













10












10








10





$begingroup$


This program is a clock that only displays minutes passed since midnight. This program is supposed to be really simple but because of some "aesthetic bug", I wrote quite a lot if-else statements that I think can be simplified.





Format Input



The first line will contain an integer T, the number of test cases.
Each test case will contain an number N, the number displayed by the
strange clock.



Format Output



For each test case, print “Case X: “ (X starts with 1) and then print
what time it is in 24 hours HH:MM format.



Constraints



1 <= T <= 1000



0 <= N <= 1439




#include <stdio.h>

int main()

int T;
scanf("%d", &T);

for (int i = 1; i <= T; i++)

int N;
scanf("%d", &N);

int hours = N / 60;
int minutes = N % 60;

printf("Case #%d: ", i);

if (N < 10)
printf("00:0%dn", N);
else if (N > 10 && N < 60)
printf("00:%dn", N);
else if (N > 60 && N < 600)
if (minutes == 0)
printf("0%d:00n", hours);
else if (minutes > 0 && minutes < 10)
printf("0%d:0%dn", hours, minutes);
else
printf("0%d:%dn", hours, minutes);

else
if (minutes == 0)
printf("%d:00n", hours);
else if (minutes > 0 && minutes < 10)
printf("%d:0%dn", hours, minutes);
else
printf("%d:%dn", hours, minutes);













share|improve this question









New contributor



Elvan Selvano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






$endgroup$




This program is a clock that only displays minutes passed since midnight. This program is supposed to be really simple but because of some "aesthetic bug", I wrote quite a lot if-else statements that I think can be simplified.





Format Input



The first line will contain an integer T, the number of test cases.
Each test case will contain an number N, the number displayed by the
strange clock.



Format Output



For each test case, print “Case X: “ (X starts with 1) and then print
what time it is in 24 hours HH:MM format.



Constraints



1 <= T <= 1000



0 <= N <= 1439




#include <stdio.h>

int main()

int T;
scanf("%d", &T);

for (int i = 1; i <= T; i++)

int N;
scanf("%d", &N);

int hours = N / 60;
int minutes = N % 60;

printf("Case #%d: ", i);

if (N < 10)
printf("00:0%dn", N);
else if (N > 10 && N < 60)
printf("00:%dn", N);
else if (N > 60 && N < 600)
if (minutes == 0)
printf("0%d:00n", hours);
else if (minutes > 0 && minutes < 10)
printf("0%d:0%dn", hours, minutes);
else
printf("0%d:%dn", hours, minutes);

else
if (minutes == 0)
printf("%d:00n", hours);
else if (minutes > 0 && minutes < 10)
printf("%d:0%dn", hours, minutes);
else
printf("%d:%dn", hours, minutes);










beginner algorithm c datetime formatting






share|improve this question









New contributor



Elvan Selvano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question









New contributor



Elvan Selvano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question








edited 2 hours ago









dfhwze

10.6k2 gold badges19 silver badges69 bronze badges




10.6k2 gold badges19 silver badges69 bronze badges






New contributor



Elvan Selvano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked yesterday









Elvan SelvanoElvan Selvano

587 bronze badges




587 bronze badges




New contributor



Elvan Selvano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




Elvan Selvano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • $begingroup$
    As I understand it, N is the number the clock must display, I.e. when N=1439, the clock should display 14:39. You should divide by 100 and not 60.
    $endgroup$
    – Édouard
    13 hours ago










  • $begingroup$
    @Édouard since a day has 1440 minutes, it's more likely that N is the number of minutes since midnight. This crucial information is missing from the instructions, which probably prepares the students to real-life situations, which are very similar.
    $endgroup$
    – Roland Illig
    3 hours ago










  • $begingroup$
    Or, the instructions may have included the definition of the "strange clock", and Elvan just didn't post this part.
    $endgroup$
    – Roland Illig
    3 hours ago
















  • $begingroup$
    As I understand it, N is the number the clock must display, I.e. when N=1439, the clock should display 14:39. You should divide by 100 and not 60.
    $endgroup$
    – Édouard
    13 hours ago










  • $begingroup$
    @Édouard since a day has 1440 minutes, it's more likely that N is the number of minutes since midnight. This crucial information is missing from the instructions, which probably prepares the students to real-life situations, which are very similar.
    $endgroup$
    – Roland Illig
    3 hours ago










  • $begingroup$
    Or, the instructions may have included the definition of the "strange clock", and Elvan just didn't post this part.
    $endgroup$
    – Roland Illig
    3 hours ago















$begingroup$
As I understand it, N is the number the clock must display, I.e. when N=1439, the clock should display 14:39. You should divide by 100 and not 60.
$endgroup$
– Édouard
13 hours ago




$begingroup$
As I understand it, N is the number the clock must display, I.e. when N=1439, the clock should display 14:39. You should divide by 100 and not 60.
$endgroup$
– Édouard
13 hours ago












$begingroup$
@Édouard since a day has 1440 minutes, it's more likely that N is the number of minutes since midnight. This crucial information is missing from the instructions, which probably prepares the students to real-life situations, which are very similar.
$endgroup$
– Roland Illig
3 hours ago




$begingroup$
@Édouard since a day has 1440 minutes, it's more likely that N is the number of minutes since midnight. This crucial information is missing from the instructions, which probably prepares the students to real-life situations, which are very similar.
$endgroup$
– Roland Illig
3 hours ago












$begingroup$
Or, the instructions may have included the definition of the "strange clock", and Elvan just didn't post this part.
$endgroup$
– Roland Illig
3 hours ago




$begingroup$
Or, the instructions may have included the definition of the "strange clock", and Elvan just didn't post this part.
$endgroup$
– Roland Illig
3 hours ago










2 Answers
2






active

oldest

votes


















15













$begingroup$

Following @Martin R's comment, I'll make my comment above a solution:



printf already supports what you're trying to achieve with your if-then-else jungle:



#include <stdio.h>

int main()

int T;
scanf("%d", &T);

for (int i = 1; i <= T; i++)

int N;
scanf("%d", &N);

int hours = N / 60;
int minutes = N % 60;

printf("Case #%d: %02d:%02dn", i, hours, minutes);




You're also missing to check the return value of scanf. It is used to report errors in the input. What is the purpose of the first scanf?



Also, I'd change the variable naming. Use minutes instead of N to communicate clearly what you're handling in the variable. You can then write the computation directly in the parameter list of printf, saving you two additional variables.






share|improve this answer











$endgroup$










  • 5




    $begingroup$
    "saving you two additional variables" - in this case, I think the separated variables are actually a good idea. They shouldn't incur a performance drop, and they help to self-document the code.
    $endgroup$
    – Reinderien
    yesterday










  • $begingroup$
    Thank you, added it.
    $endgroup$
    – Cornholio
    yesterday










  • $begingroup$
    "Use minutes instead of N to communicate clearly what you're handling in the variable." The symbol N is explicitly defined in the problem statement. However, the word minutes could mean either N or the "minutes" field in the output.
    $endgroup$
    – JiK
    9 hours ago










  • $begingroup$
    Note that with input like -61, Output of -01:00 might be preferred over this answer's "-01:-01". Yet with "0 <= N <= 1439" and "minutes passed since midnight", we might not worry about yesterday.
    $endgroup$
    – chux
    49 mins ago



















10













$begingroup$

If your code is checked by an automated process, you will probably fail all test cases because your code prints a #, which was not asked for. You should better remove it. Just print "Case %d" instead of "Case #%d".






share|improve this answer









$endgroup$

















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "196"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );






    Elvan Selvano is a new contributor. Be nice, and check out our Code of Conduct.









    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f227255%2fdisplaying-minutes-in-hhmm-format%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    15













    $begingroup$

    Following @Martin R's comment, I'll make my comment above a solution:



    printf already supports what you're trying to achieve with your if-then-else jungle:



    #include <stdio.h>

    int main()

    int T;
    scanf("%d", &T);

    for (int i = 1; i <= T; i++)

    int N;
    scanf("%d", &N);

    int hours = N / 60;
    int minutes = N % 60;

    printf("Case #%d: %02d:%02dn", i, hours, minutes);




    You're also missing to check the return value of scanf. It is used to report errors in the input. What is the purpose of the first scanf?



    Also, I'd change the variable naming. Use minutes instead of N to communicate clearly what you're handling in the variable. You can then write the computation directly in the parameter list of printf, saving you two additional variables.






    share|improve this answer











    $endgroup$










    • 5




      $begingroup$
      "saving you two additional variables" - in this case, I think the separated variables are actually a good idea. They shouldn't incur a performance drop, and they help to self-document the code.
      $endgroup$
      – Reinderien
      yesterday










    • $begingroup$
      Thank you, added it.
      $endgroup$
      – Cornholio
      yesterday










    • $begingroup$
      "Use minutes instead of N to communicate clearly what you're handling in the variable." The symbol N is explicitly defined in the problem statement. However, the word minutes could mean either N or the "minutes" field in the output.
      $endgroup$
      – JiK
      9 hours ago










    • $begingroup$
      Note that with input like -61, Output of -01:00 might be preferred over this answer's "-01:-01". Yet with "0 <= N <= 1439" and "minutes passed since midnight", we might not worry about yesterday.
      $endgroup$
      – chux
      49 mins ago
















    15













    $begingroup$

    Following @Martin R's comment, I'll make my comment above a solution:



    printf already supports what you're trying to achieve with your if-then-else jungle:



    #include <stdio.h>

    int main()

    int T;
    scanf("%d", &T);

    for (int i = 1; i <= T; i++)

    int N;
    scanf("%d", &N);

    int hours = N / 60;
    int minutes = N % 60;

    printf("Case #%d: %02d:%02dn", i, hours, minutes);




    You're also missing to check the return value of scanf. It is used to report errors in the input. What is the purpose of the first scanf?



    Also, I'd change the variable naming. Use minutes instead of N to communicate clearly what you're handling in the variable. You can then write the computation directly in the parameter list of printf, saving you two additional variables.






    share|improve this answer











    $endgroup$










    • 5




      $begingroup$
      "saving you two additional variables" - in this case, I think the separated variables are actually a good idea. They shouldn't incur a performance drop, and they help to self-document the code.
      $endgroup$
      – Reinderien
      yesterday










    • $begingroup$
      Thank you, added it.
      $endgroup$
      – Cornholio
      yesterday










    • $begingroup$
      "Use minutes instead of N to communicate clearly what you're handling in the variable." The symbol N is explicitly defined in the problem statement. However, the word minutes could mean either N or the "minutes" field in the output.
      $endgroup$
      – JiK
      9 hours ago










    • $begingroup$
      Note that with input like -61, Output of -01:00 might be preferred over this answer's "-01:-01". Yet with "0 <= N <= 1439" and "minutes passed since midnight", we might not worry about yesterday.
      $endgroup$
      – chux
      49 mins ago














    15














    15










    15







    $begingroup$

    Following @Martin R's comment, I'll make my comment above a solution:



    printf already supports what you're trying to achieve with your if-then-else jungle:



    #include <stdio.h>

    int main()

    int T;
    scanf("%d", &T);

    for (int i = 1; i <= T; i++)

    int N;
    scanf("%d", &N);

    int hours = N / 60;
    int minutes = N % 60;

    printf("Case #%d: %02d:%02dn", i, hours, minutes);




    You're also missing to check the return value of scanf. It is used to report errors in the input. What is the purpose of the first scanf?



    Also, I'd change the variable naming. Use minutes instead of N to communicate clearly what you're handling in the variable. You can then write the computation directly in the parameter list of printf, saving you two additional variables.






    share|improve this answer











    $endgroup$



    Following @Martin R's comment, I'll make my comment above a solution:



    printf already supports what you're trying to achieve with your if-then-else jungle:



    #include <stdio.h>

    int main()

    int T;
    scanf("%d", &T);

    for (int i = 1; i <= T; i++)

    int N;
    scanf("%d", &N);

    int hours = N / 60;
    int minutes = N % 60;

    printf("Case #%d: %02d:%02dn", i, hours, minutes);




    You're also missing to check the return value of scanf. It is used to report errors in the input. What is the purpose of the first scanf?



    Also, I'd change the variable naming. Use minutes instead of N to communicate clearly what you're handling in the variable. You can then write the computation directly in the parameter list of printf, saving you two additional variables.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited yesterday

























    answered yesterday









    CornholioCornholio

    7762 silver badges10 bronze badges




    7762 silver badges10 bronze badges










    • 5




      $begingroup$
      "saving you two additional variables" - in this case, I think the separated variables are actually a good idea. They shouldn't incur a performance drop, and they help to self-document the code.
      $endgroup$
      – Reinderien
      yesterday










    • $begingroup$
      Thank you, added it.
      $endgroup$
      – Cornholio
      yesterday










    • $begingroup$
      "Use minutes instead of N to communicate clearly what you're handling in the variable." The symbol N is explicitly defined in the problem statement. However, the word minutes could mean either N or the "minutes" field in the output.
      $endgroup$
      – JiK
      9 hours ago










    • $begingroup$
      Note that with input like -61, Output of -01:00 might be preferred over this answer's "-01:-01". Yet with "0 <= N <= 1439" and "minutes passed since midnight", we might not worry about yesterday.
      $endgroup$
      – chux
      49 mins ago













    • 5




      $begingroup$
      "saving you two additional variables" - in this case, I think the separated variables are actually a good idea. They shouldn't incur a performance drop, and they help to self-document the code.
      $endgroup$
      – Reinderien
      yesterday










    • $begingroup$
      Thank you, added it.
      $endgroup$
      – Cornholio
      yesterday










    • $begingroup$
      "Use minutes instead of N to communicate clearly what you're handling in the variable." The symbol N is explicitly defined in the problem statement. However, the word minutes could mean either N or the "minutes" field in the output.
      $endgroup$
      – JiK
      9 hours ago










    • $begingroup$
      Note that with input like -61, Output of -01:00 might be preferred over this answer's "-01:-01". Yet with "0 <= N <= 1439" and "minutes passed since midnight", we might not worry about yesterday.
      $endgroup$
      – chux
      49 mins ago








    5




    5




    $begingroup$
    "saving you two additional variables" - in this case, I think the separated variables are actually a good idea. They shouldn't incur a performance drop, and they help to self-document the code.
    $endgroup$
    – Reinderien
    yesterday




    $begingroup$
    "saving you two additional variables" - in this case, I think the separated variables are actually a good idea. They shouldn't incur a performance drop, and they help to self-document the code.
    $endgroup$
    – Reinderien
    yesterday












    $begingroup$
    Thank you, added it.
    $endgroup$
    – Cornholio
    yesterday




    $begingroup$
    Thank you, added it.
    $endgroup$
    – Cornholio
    yesterday












    $begingroup$
    "Use minutes instead of N to communicate clearly what you're handling in the variable." The symbol N is explicitly defined in the problem statement. However, the word minutes could mean either N or the "minutes" field in the output.
    $endgroup$
    – JiK
    9 hours ago




    $begingroup$
    "Use minutes instead of N to communicate clearly what you're handling in the variable." The symbol N is explicitly defined in the problem statement. However, the word minutes could mean either N or the "minutes" field in the output.
    $endgroup$
    – JiK
    9 hours ago












    $begingroup$
    Note that with input like -61, Output of -01:00 might be preferred over this answer's "-01:-01". Yet with "0 <= N <= 1439" and "minutes passed since midnight", we might not worry about yesterday.
    $endgroup$
    – chux
    49 mins ago





    $begingroup$
    Note that with input like -61, Output of -01:00 might be preferred over this answer's "-01:-01". Yet with "0 <= N <= 1439" and "minutes passed since midnight", we might not worry about yesterday.
    $endgroup$
    – chux
    49 mins ago














    10













    $begingroup$

    If your code is checked by an automated process, you will probably fail all test cases because your code prints a #, which was not asked for. You should better remove it. Just print "Case %d" instead of "Case #%d".






    share|improve this answer









    $endgroup$



















      10













      $begingroup$

      If your code is checked by an automated process, you will probably fail all test cases because your code prints a #, which was not asked for. You should better remove it. Just print "Case %d" instead of "Case #%d".






      share|improve this answer









      $endgroup$

















        10














        10










        10







        $begingroup$

        If your code is checked by an automated process, you will probably fail all test cases because your code prints a #, which was not asked for. You should better remove it. Just print "Case %d" instead of "Case #%d".






        share|improve this answer









        $endgroup$



        If your code is checked by an automated process, you will probably fail all test cases because your code prints a #, which was not asked for. You should better remove it. Just print "Case %d" instead of "Case #%d".







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered yesterday









        Roland IlligRoland Illig

        15.1k2 gold badges24 silver badges58 bronze badges




        15.1k2 gold badges24 silver badges58 bronze badges























            Elvan Selvano is a new contributor. Be nice, and check out our Code of Conduct.









            draft saved

            draft discarded


















            Elvan Selvano is a new contributor. Be nice, and check out our Code of Conduct.












            Elvan Selvano is a new contributor. Be nice, and check out our Code of Conduct.











            Elvan Selvano is a new contributor. Be nice, and check out our Code of Conduct.














            Thanks for contributing an answer to Code Review Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f227255%2fdisplaying-minutes-in-hhmm-format%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

            Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

            Ласкавець круглолистий Зміст Опис | Поширення | Галерея | Примітки | Посилання | Навігаційне меню58171138361-22960890446Bupleurum rotundifoliumEuro+Med PlantbasePlants of the World Online — Kew ScienceGermplasm Resources Information Network (GRIN)Ласкавецькн. VI : Літери Ком — Левиправивши або дописавши її