結果
問題 |
No.652 E869120 and TimeZone
|
ユーザー |
![]() |
提出日時 | 2018-07-16 02:30:12 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 618 bytes |
コンパイル時間 | 2,774 ms |
コンパイル使用メモリ | 103,552 KB |
実行使用メモリ | 19,072 KB |
最終ジャッジ日時 | 2024-11-07 23:22:07 |
合計ジャッジ時間 | 4,869 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 5 WA * 25 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; namespace y { class Program { static void Main(string[] args) { var ss = Console.ReadLine().Split(); var d = new DateTime(2018, 7, 16, int.Parse(ss[0]), int.Parse(ss[1]), 0); var s = ss[2].Substring(ss[2].IndexOf("UTC") + 3); int h = 0; int m = 0; h = int.Parse(s.Split('.')[0]); if (s.Contains(".")) m = 30; var t = new TimeSpan(h - 9, m, 0); var ans = d + t; Console.WriteLine("{0}:{1}", ans.Hour.ToString("00"), ans.Minute.ToString("00")); } } }