Skip to content

Instantly share code, notes, and snippets.

@ChiiAyano
Created February 6, 2012 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChiiAyano/1752343 to your computer and use it in GitHub Desktop.
Save ChiiAyano/1752343 to your computer and use it in GitHub Desktop.
SONY "GO FOR IT" Q.1
// License: BSD
using System;
namespace LifeClock
{
class Program
{
static void Main(string[] args)
{
int n = 80;
DateTime start = new DateTime(1990, 4, 16, 0, 0, 0);
DateTime end = new DateTime(start.Year + n, 12, 31, 23, 59, 59);
TimeSpan elapsed = TimeSpan.FromDays(((DateTime.Now - start).TotalSeconds / ((end - start).TotalSeconds)));
Console.WriteLine("今日は {0} 時 {1} 分 {2} 秒です。", elapsed.Hours, elapsed.Minutes, elapsed.Seconds);
Console.ReadKey();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment