Celsius - Fahrenheit anagram
C# - 166

Due to the small number of matches, I thought it might be easier to hardcode the outputs:

void F(string i){int n=int.Parse(i.Substring(0,i.Length-1));
n=i.Last()=='C'?n:5*(n-32)/9;
Console.Write(n&gt;4685?"7305 13245":n&gt;2345?"2620 4780":n&gt;275?"275 527":"0 0");}


Edit: 352

To do it right requires a bit more work. Here's a first attempt at using a whole pile of linq:

using System;
using System.Linq;
class P{static void Main(string[] i)
{
   int n=int.Parse(i[0].Substring(0,i[0].Length-1));
   n=i[0].Last()=='C'?n:5*(n-32)/9;
   var q=Enumerable.Range(1,n).Where(x=&gt;new string(((decimal)x*9/5+32).ToString().OrderBy(y=&gt;y).ToArray())==new string(x.ToString().OrderBy(y=&gt;y).ToArray()));
   Console.Write(q.Sum()+" "+q.Sum(x=&gt;x*9/5+32));
}}


Maybe the 'use a pile of linq instead of a loop' approach hurt me too much. I'll try and shorten it.

Edit 2: 356

Since I'm already way behind in raw count, here's a one-liner from hell:

Console.Write(Enumerable.Range(1,i.Last()=='C'?int.Parse(i.Substring(0,i.Length-1)):5*(int.Parse(i.Substring(0,i.Length-1))-32)/9).Where(x=&gt;new string(((decimal)x*9/5+32).ToString().OrderBy(y=&gt;y).ToArray())==new string(x.ToString().OrderBy(y=&gt;y).ToArray())).Aggregate("0 0",(a,t)=&gt;(int.Parse(a.Split(' ')[0])+t)+" "+(int.Parse(a.Split(' ')[1])+t*9/5+32)))