結果

問題 No.646 逆ピラミッド
ユーザー uma-pinehilluma-pinehill
提出日時 2018-05-17 16:23:32
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 56 ms / 2,000 ms
コード長 463 bytes
コンパイル時間 3,841 ms
コンパイル使用メモリ 103,804 KB
実行使用メモリ 23,020 KB
最終ジャッジ日時 2023-09-10 22:33:56
合計ジャッジ時間 3,196 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
20,968 KB
testcase_01 AC 56 ms
20,932 KB
testcase_02 AC 55 ms
21,020 KB
testcase_03 AC 55 ms
20,956 KB
testcase_04 AC 55 ms
22,932 KB
testcase_05 AC 56 ms
23,020 KB
testcase_06 AC 55 ms
21,020 KB
testcase_07 AC 56 ms
20,976 KB
testcase_08 AC 55 ms
20,932 KB
testcase_09 AC 56 ms
20,932 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Text;

public class Program
{
    static void Main()
    {
        string s = Console.ReadLine();
        int ss = int.Parse(s);
        int len = Convert.ToInt32(Math.Floor(Math.Log10(ss))) + 1;
        var dd= new StringBuilder(len * ss).Insert(0,s,ss).ToString();
        for(var i = ss;ss>1;ss--){
            Console.WriteLine(dd);
            dd = dd.Substring(0, dd.Length - len);
        }
        Console.WriteLine(dd);
    }
}
0