Skip to main content
Commonmark migration
Source Link

#C#6, 149 bytes#

C#6, 149 bytes

Thanks to Bob for saving 57 bytes!

using System;class P{static void Main(){DateTime a,x=new DateTime(2019,3,31);while((a=DateTime.Now)<x)Console.Write($"\r{x-a:ddd\\:hh\\:mm\\:ss}");}}

Ungolfed program:

using System;

class P
{
    static void Main()
    {
        DateTime a,
                x = new DateTime(2019, 3, 31);
        while ( (a = DateTime.Now) < x)
            Console.Write($"\r{x-a:ddd\\:hh\\:mm\\:ss}");
    }
}

#C#, 210 206 159 bytes#

C#, 210 206 159 bytes

Thanks to Bob for saving another 47 bytes!

Thanks to Martin Smith for saving 4 bytes!

using System;class P{static void Main(){DateTime a,x=new DateTime(2019,3,31);while((a=DateTime.Now)<x)Console.Write("\r"+(x-a).ToString(@"ddd\:hh\:mm\:ss"));}}

Ungolfed program:

using System;

class P
{
    static void Main()
    {
        DateTime a,
                x = new DateTime(2019, 3, 31);
        while ( (a = DateTime.Now) < x)
            Console.Write("\r" + (x - a).ToString(@"ddd\:hh\:mm\:ss"));
    }
}

#C#6, 149 bytes#

Thanks to Bob for saving 57 bytes!

using System;class P{static void Main(){DateTime a,x=new DateTime(2019,3,31);while((a=DateTime.Now)<x)Console.Write($"\r{x-a:ddd\\:hh\\:mm\\:ss}");}}

Ungolfed program:

using System;

class P
{
    static void Main()
    {
        DateTime a,
                x = new DateTime(2019, 3, 31);
        while ( (a = DateTime.Now) < x)
            Console.Write($"\r{x-a:ddd\\:hh\\:mm\\:ss}");
    }
}

#C#, 210 206 159 bytes#

Thanks to Bob for saving another 47 bytes!

Thanks to Martin Smith for saving 4 bytes!

using System;class P{static void Main(){DateTime a,x=new DateTime(2019,3,31);while((a=DateTime.Now)<x)Console.Write("\r"+(x-a).ToString(@"ddd\:hh\:mm\:ss"));}}

Ungolfed program:

using System;

class P
{
    static void Main()
    {
        DateTime a,
                x = new DateTime(2019, 3, 31);
        while ( (a = DateTime.Now) < x)
            Console.Write("\r" + (x - a).ToString(@"ddd\:hh\:mm\:ss"));
    }
}

C#6, 149 bytes

Thanks to Bob for saving 57 bytes!

using System;class P{static void Main(){DateTime a,x=new DateTime(2019,3,31);while((a=DateTime.Now)<x)Console.Write($"\r{x-a:ddd\\:hh\\:mm\\:ss}");}}

Ungolfed program:

using System;

class P
{
    static void Main()
    {
        DateTime a,
                x = new DateTime(2019, 3, 31);
        while ( (a = DateTime.Now) < x)
            Console.Write($"\r{x-a:ddd\\:hh\\:mm\\:ss}");
    }
}

C#, 210 206 159 bytes

Thanks to Bob for saving another 47 bytes!

Thanks to Martin Smith for saving 4 bytes!

using System;class P{static void Main(){DateTime a,x=new DateTime(2019,3,31);while((a=DateTime.Now)<x)Console.Write("\r"+(x-a).ToString(@"ddd\:hh\:mm\:ss"));}}

Ungolfed program:

using System;

class P
{
    static void Main()
    {
        DateTime a,
                x = new DateTime(2019, 3, 31);
        while ( (a = DateTime.Now) < x)
            Console.Write("\r" + (x - a).ToString(@"ddd\:hh\:mm\:ss"));
    }
}
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

#C#6, 149 bytes#

Thanks to BobBob for saving 57 bytes!

using System;class P{static void Main(){DateTime a,x=new DateTime(2019,3,31);while((a=DateTime.Now)<x)Console.Write($"\r{x-a:ddd\\:hh\\:mm\\:ss}");}}

Ungolfed program:

using System;

class P
{
    static void Main()
    {
        DateTime a,
                x = new DateTime(2019, 3, 31);
        while ( (a = DateTime.Now) < x)
            Console.Write($"\r{x-a:ddd\\:hh\\:mm\\:ss}");
    }
}

#C#, 210 206 159 bytes#

Thanks to BobBob for saving another 47 bytes!

Thanks to Martin SmithMartin Smith for saving 4 bytes!

using System;class P{static void Main(){DateTime a,x=new DateTime(2019,3,31);while((a=DateTime.Now)<x)Console.Write("\r"+(x-a).ToString(@"ddd\:hh\:mm\:ss"));}}

Ungolfed program:

using System;

class P
{
    static void Main()
    {
        DateTime a,
                x = new DateTime(2019, 3, 31);
        while ( (a = DateTime.Now) < x)
            Console.Write("\r" + (x - a).ToString(@"ddd\:hh\:mm\:ss"));
    }
}

#C#6, 149 bytes#

Thanks to Bob for saving 57 bytes!

using System;class P{static void Main(){DateTime a,x=new DateTime(2019,3,31);while((a=DateTime.Now)<x)Console.Write($"\r{x-a:ddd\\:hh\\:mm\\:ss}");}}

Ungolfed program:

using System;

class P
{
    static void Main()
    {
        DateTime a,
                x = new DateTime(2019, 3, 31);
        while ( (a = DateTime.Now) < x)
            Console.Write($"\r{x-a:ddd\\:hh\\:mm\\:ss}");
    }
}

#C#, 210 206 159 bytes#

Thanks to Bob for saving another 47 bytes!

Thanks to Martin Smith for saving 4 bytes!

using System;class P{static void Main(){DateTime a,x=new DateTime(2019,3,31);while((a=DateTime.Now)<x)Console.Write("\r"+(x-a).ToString(@"ddd\:hh\:mm\:ss"));}}

Ungolfed program:

using System;

class P
{
    static void Main()
    {
        DateTime a,
                x = new DateTime(2019, 3, 31);
        while ( (a = DateTime.Now) < x)
            Console.Write("\r" + (x - a).ToString(@"ddd\:hh\:mm\:ss"));
    }
}

#C#6, 149 bytes#

Thanks to Bob for saving 57 bytes!

using System;class P{static void Main(){DateTime a,x=new DateTime(2019,3,31);while((a=DateTime.Now)<x)Console.Write($"\r{x-a:ddd\\:hh\\:mm\\:ss}");}}

Ungolfed program:

using System;

class P
{
    static void Main()
    {
        DateTime a,
                x = new DateTime(2019, 3, 31);
        while ( (a = DateTime.Now) < x)
            Console.Write($"\r{x-a:ddd\\:hh\\:mm\\:ss}");
    }
}

#C#, 210 206 159 bytes#

Thanks to Bob for saving another 47 bytes!

Thanks to Martin Smith for saving 4 bytes!

using System;class P{static void Main(){DateTime a,x=new DateTime(2019,3,31);while((a=DateTime.Now)<x)Console.Write("\r"+(x-a).ToString(@"ddd\:hh\:mm\:ss"));}}

Ungolfed program:

using System;

class P
{
    static void Main()
    {
        DateTime a,
                x = new DateTime(2019, 3, 31);
        while ( (a = DateTime.Now) < x)
            Console.Write("\r" + (x - a).ToString(@"ddd\:hh\:mm\:ss"));
    }
}
solution improvement
Source Link
adrianmp
  • 1.7k
  • 1
  • 10
  • 15

#C##C#6, 210 206149 bytes#

Thanks to Martin SmithBob for saving 457 bytes!

using System;class P{static void Main(){DateTime a,x=new DateTime(2019,3,31);while((a=DateTime.Now)<x){Console.Clear();Console.Write(($"\r{x-a).ToString(@"d\:hh\ddd\\:mm\hh\\:ss"));System.Threading.Thread.Sleep(1000mm\\:ss}");}}}

Ungolfed program:

using System;

class P
{
    static void Main()
    {
        DateTime a,
                x = new DateTime(2019, 3, 31);
        while ( (a = DateTime.Now) < x)
        {
            Console.ClearWrite($"\r{x-a:ddd\\:hh\\:mm\\:ss}");
      }
}

#C#, 210 206 159 bytes#

Thanks to Bob for saving another 47 bytes!

Thanks to Martin Smith for saving 4 bytes!

using System;class P{static void Main(){DateTime a,x=new DateTime(2019,3,31);while((a=DateTime.Now)<x)Console.Write("\r"+(x - a).ToString(@"d\@"ddd\:hh\:mm\:ss"));}}

Ungolfed program:

using System;

class P
{
    static void Main()
    {
    System.Threading.Thread.Sleep    DateTime a,
                x = new DateTime(10002019, 3, 31);
        }while ( (a = DateTime.Now) < x)
            Console.Write("\r" + (x - a).ToString(@"ddd\:hh\:mm\:ss"));
    }
}

#C#, 210 206 bytes#

Thanks to Martin Smith for saving 4 bytes!

using System;class P{static void Main(){DateTime a,x=new DateTime(2019,3,31);while((a=DateTime.Now)<x){Console.Clear();Console.Write((x-a).ToString(@"d\:hh\:mm\:ss"));System.Threading.Thread.Sleep(1000);}}}

Ungolfed program:

using System;

class P
{
    static void Main()
    {
        DateTime a,
                x = new DateTime(2019, 3, 31);
        while ((a = DateTime.Now) < x)
        {
            Console.Clear();
            Console.Write((x - a).ToString(@"d\:hh\:mm\:ss"));
            System.Threading.Thread.Sleep(1000);
        }
    }
}

#C#6, 149 bytes#

Thanks to Bob for saving 57 bytes!

using System;class P{static void Main(){DateTime a,x=new DateTime(2019,3,31);while((a=DateTime.Now)<x)Console.Write($"\r{x-a:ddd\\:hh\\:mm\\:ss}");}}

Ungolfed program:

using System;

class P
{
    static void Main()
    {
        DateTime a,
                x = new DateTime(2019, 3, 31);
        while ( (a = DateTime.Now) < x)
            Console.Write($"\r{x-a:ddd\\:hh\\:mm\\:ss}");
    }
}

#C#, 210 206 159 bytes#

Thanks to Bob for saving another 47 bytes!

Thanks to Martin Smith for saving 4 bytes!

using System;class P{static void Main(){DateTime a,x=new DateTime(2019,3,31);while((a=DateTime.Now)<x)Console.Write("\r"+(x-a).ToString(@"ddd\:hh\:mm\:ss"));}}

Ungolfed program:

using System;

class P
{
    static void Main()
    {
        DateTime a,
                x = new DateTime(2019, 3, 31);
        while ( (a = DateTime.Now) < x)
            Console.Write("\r" + (x - a).ToString(@"ddd\:hh\:mm\:ss"));
    }
}
solution improvement
Source Link
adrianmp
  • 1.7k
  • 1
  • 10
  • 15
Loading
Source Link
adrianmp
  • 1.7k
  • 1
  • 10
  • 15
Loading