Skip to content

Instantly share code, notes, and snippets.

@rainbow23
Created May 28, 2017 16:37
Show Gist options
  • Save rainbow23/78bd90113436ddfb110397b7a88e1602 to your computer and use it in GitHub Desktop.
Save rainbow23/78bd90113436ddfb110397b7a88e1602 to your computer and use it in GitHub Desktop.
C037:アニメの日時 再チャレンジ採点結果
using System;
public class Hello{
public static void Main(){
// 自分の得意な言語で
// Let's チャレンジ!!
var line = System.Console.ReadLine();
string[] buff = line.Split(' ');
string[] monthAndDays = buff[0].Split('/');
string[] hoursAndminutes = buff[1].Split(':');
int days = Int32.Parse(monthAndDays[1]);
int hours = Int32.Parse(hoursAndminutes[0]);
int div = hours / 24;
hours = hours % 24;
if(div >= 1)
{
days += div;
}
System.Console.WriteLine("{0:00}/{1:00} {2:00}:{3:00}", monthAndDays[0], days, hours, hoursAndminutes[1]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment