結果

問題 No.432 占い(Easy)
ユーザー claw88claw88
提出日時 2016-10-14 22:36:25
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 312 ms / 2,000 ms
コード長 1,027 bytes
コンパイル時間 2,436 ms
コンパイル使用メモリ 105,200 KB
実行使用メモリ 28,848 KB
最終ジャッジ日時 2023-08-14 11:10:15
合計ジャッジ時間 6,254 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
20,772 KB
testcase_01 AC 54 ms
22,692 KB
testcase_02 AC 55 ms
20,680 KB
testcase_03 AC 55 ms
20,568 KB
testcase_04 AC 57 ms
20,552 KB
testcase_05 AC 56 ms
20,848 KB
testcase_06 AC 54 ms
22,620 KB
testcase_07 AC 58 ms
22,604 KB
testcase_08 AC 55 ms
22,620 KB
testcase_09 AC 55 ms
22,644 KB
testcase_10 AC 58 ms
22,772 KB
testcase_11 AC 78 ms
26,736 KB
testcase_12 AC 310 ms
24,824 KB
testcase_13 AC 312 ms
24,872 KB
testcase_14 AC 78 ms
28,848 KB
testcase_15 AC 56 ms
22,728 KB
testcase_16 AC 57 ms
20,644 KB
testcase_17 AC 306 ms
26,828 KB
testcase_18 AC 166 ms
26,792 KB
testcase_19 AC 123 ms
24,772 KB
testcase_20 AC 87 ms
27,004 KB
testcase_21 AC 93 ms
24,740 KB
testcase_22 AC 56 ms
20,760 KB
testcase_23 AC 56 ms
20,568 KB
testcase_24 AC 56 ms
18,732 KB
testcase_25 AC 56 ms
22,608 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.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Console;
namespace yuki_432
{
    class Program
    {
        static void Main(string[] args)
        {
            var T = scan;
            var sb = new StringBuilder();
            for (int i = 0; i < T; i++)
            {
                var S = ReadLine();
                
                var d = S;
                var m = "";
                while (d.Length > 1)
                {
                    for (int j = 1; j < d.Length; j++)
                    {
                        var k = int.Parse(d[j].ToString()) + int.Parse(d[j - 1].ToString());
                        m += (k % 10 + (k / 10) % 10).ToString();             
                    }
                    d = m;
                    m = "";

                }
                sb.AppendLine(d);
            }
            Write(sb);
        }

        static int scan { get { return int.Parse(ReadLine()) ; } }
    }
}
0