Skip to content

Instantly share code, notes, and snippets.

@Nucleareal
Last active December 25, 2015 16:29
Show Gist options
  • Save Nucleareal/7006199 to your computer and use it in GitHub Desktop.
Save Nucleareal/7006199 to your computer and use it in GitHub Desktop.
5文字短くなった
using System;using System.Linq;class L{public static void Main(){var m=" bottles of beer";var s=m.Replace("s","");var l="on the wall";var n="no more";foreach (var v in Enumerable.Range(1,100)){var d=100-v; var b=d==0; var a=((99+d)%100);Console.WriteLine("{0}{1} {2}, {3}{1}.\n{4}, {5}{6} {2}.\n",b?n.Replace("n","N"):d.ToString(),v==99?s:m,l,b?n:d.ToString(),b?"Go to the store and buy some more":"Take one down and pass it around",a!=0?a.ToString():n,v==98?s:m);}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment