Created
May 28, 2017 16:37
-
-
Save rainbow23/78bd90113436ddfb110397b7a88e1602 to your computer and use it in GitHub Desktop.
C037:アニメの日時 再チャレンジ採点結果
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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