結果
| 問題 | No.646 逆ピラミッド |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-05-17 16:23:32 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 24 ms / 2,000 ms |
| コード長 | 463 bytes |
| コンパイル時間 | 799 ms |
| コンパイル使用メモリ | 103,552 KB |
| 実行使用メモリ | 18,432 KB |
| 最終ジャッジ日時 | 2024-06-28 13:30:54 |
| 合計ジャッジ時間 | 1,586 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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);
}
}