Comment detail

LL Golf Hole 7 - バイト数を読みやすくする (Nested Flatten)
標準入力から読み込み。
Yまで対応しています。
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
using System;
class P {
    static void Main() {
        double n = double.Parse(Console.ReadLine());
        string s = " kMGTPEZY";
        int c = 0, l = 1000;
        for (; n >= l; c++)
            n /= l;
        Console.WriteLine("{0:f1}{1}", n, s[c]);
    }
}

Index

Feed

Other

Link

Pathtraq

loading...