language: C# (mono-2.8)
date: 655 days 6 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
public static class Program
{
    static System.Collections.Generic.Dictionary<char, long> prefixes = new System.Collections.Generic.Dictionary<char, long>() {
      { 'k', 1L<<10 },
      { 'M', 1L<<20 },
      { 'G', 1L<<30 },
      { 'T', 1L<<40 },
      { 'P', 1L<<50 },
      { 'E', 1L<<60 } };
 
    static void Main()
    {
        System.Console.WriteLine(System.Math.Round(1.2 * prefixes['M']));
    }
}