RobIII
  • Member for 8 years
  • Last seen more than a month ago
Happy Birthday to Me!
6 votes

C# 198.05 (233 - 15%) using s=System;class P{static void Main(){string t=s.DateTime.Now.ToString("Mdd"),b="1202";if(s.IO.File.GetCreationTime(typeof(P).Assembly.Location).ToString("Mdd")==t|b==t)s....

View answer
Generate Monday Numbers
4 votes

C#, 230 227 It's been a while since I've golved so I probably forgot a few tricks to get the bytecount down. Will improve when I think of them... For now: using System.Linq;class P{static void Main()...

View answer
Check if a UUID is valid without using regexes
3 votes

C# 196 bytes using System.Linq;class P{bool T(string v){var r=v.Length==36;for(var i=0;i<v.Length;i++)r&=new[]{8,13,18,23}.Any(t=>t==i)?v[i]=='-':v[i]>47&&v[i]<58|v[i]>64&...

View answer
Cubify This! A lesson in grayscale... er... color... er... whatever
3 votes

C# using System; using System.Drawing; using System.Drawing.Imaging; using System.Linq; class Program { static void Main(string[] args) { unchecked { var t = new[]...

View answer
I done did made a spaceship maw!
2 votes

C#, 113 105 98 bytes s=>{for(int l=s.Length,i=-l;++i<l;)WriteLine(Join("",s.Select(c=>$"{c}".PadRight(i<0?l+i:l-i))));} Try it online!

View answer
The kitten command
2 votes

C#, 230 226 bytes namespace System{using Linq;class P{static void Main(string[]a){Console.Write(string.Concat((a.Length>0?string.Concat(a.Select(f=>IO.File.ReadAllText(f))):Console.In.ReadToEnd(...

View answer
Draw the Heart Shape
2 votes

C# 224 class P{static void Main(){for(int i=0,m=1;i<30;i++)for(int l=0;l<new[]{5,6,7,6,8,10,3,10,4,13,1,13,1,87,1,27,4,23,7,20,11,16,16,11,20,7,24,3,27,1}[i];l++,m++)System.Console.Write((i%2&...

View answer
Execute prints backwards
2 votes

C# using System; using System.Linq; class P { static void Main() { new Action[] { () => Console.WriteLine("Line 1"), () => Console.WriteLine("Line 2"), ...

View answer
Character Cross
1 votes

C# (192 / 170) using System;class P{static void Main(){var s=Console.ReadLine();int x,y,l=s.Length;for(x=0;x<l;x++){for(y=0;y<l;y++)Console.Write(x==y||l-x==y+1?s.Substring(x,1):" ");Console....

View answer
Find words containing every vowel
1 votes

C# - 170 using System.Linq;class P{static void Main(string[]a){System.Console.Write(string.Join(",",System.IO.File.ReadAllLines(a[0]).Where(w=>"aeiouy".All(c=>w.Contains(c)))));}} Formatted: ...

View answer
Sort numbers by binary 1's count
1 votes

C#, 191 183 172 thanks to Rik using System.Linq;class P{static void Main(string[]a){System.Console.WriteLine(string.Join(" ",a.Select(int.Parse).OrderBy(v=>{int c=0;for(;v>0;c++,v&=v-1);...

View answer
Letters in phone numbers
1 votes

C# 140 using System.Linq;class P{static void Main(string[]a){System.Console.Write(string.Concat(a[0].Select(d=>(char)(d>96?20-d/122+5*d/16:d))));}}

View answer
Is it Christmas?
1 votes

C# (126) using System;class P{static void Main(){while(DateTime.Now.Date.ToString("Md")!="1225");Console.WriteLine("It's Christmas");}} Nicer for your battery: C# (163) using s=System;class P{...

View answer
Print some JSON
0 votes

C#, 76 bytes using System;public class P{public void Main(){Console.Write("{\"\":"+1/3d+"}");}} Output: {"":0.333333333333333}

View answer
Converting to Secret Language
0 votes

C#, 163 Yes, this is not code-golf. I went for shortest anyway (or at least, made a first stab at it) using System.Linq;class P{static void Main(string[]a){System.Console.WriteLine(string.Concat(a[0]...

View answer
Given a number, program must return the alphabet letter correspondent
0 votes

C#, 87 class P{static void Main(string[]a){System.Console.Write((char)(int.Parse(a[0])+64));}} Complete program (not some (part of a) "function" expecting foo to be bar to work), accepts command ...

View answer
Print a Christmas Tree
0 votes

C#, Fixed height, 136 chars class P{static void Main(){for(int i=0;i<10;i++)System.Console.WriteLine((i>0?new string('0',(i-1)*2+1):"*").PadLeft(10+(i>0?i-1:0)));}} Formatted: class P { ...

View answer
99 Bottles Of Beer
0 votes

C# (298 294) using System;class P{static void Main(){Func<int,string>f=(i)=>{return i+" bottle"+(i>1?"s":"")+" of beer";};for(int i=99;i>0;i--)Console.Write("{0} on the wall, {0}.\n"+(...

View answer
Transform number into 7-segment display pattern
0 votes

C#, 386 382 364 chars / 374 bytes (UTF-8) and (lots? of) room for improvement... using System.Linq;using C=System.Console;class P{static void Main(string[] args){var s=C.ReadLine();for(int l=0;l<5;...

View answer