結果

問題 No.1168 Digit Sum Sequence
ユーザー keymoonkeymoon
提出日時 2020-12-31 19:44:36
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 491 bytes
コンパイル時間 1,684 ms
コンパイル使用メモリ 106,624 KB
実行使用メモリ 26,784 KB
最終ジャッジ日時 2024-04-18 01:19:45
合計ジャッジ時間 2,373 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
26,784 KB
testcase_01 AC 22 ms
24,352 KB
testcase_02 AC 23 ms
24,604 KB
testcase_03 AC 24 ms
26,648 KB
testcase_04 AC 24 ms
24,484 KB
testcase_05 AC 24 ms
26,784 KB
testcase_06 AC 23 ms
24,608 KB
testcase_07 AC 22 ms
24,736 KB
testcase_08 AC 23 ms
24,868 KB
testcase_09 AC 22 ms
24,884 KB
testcase_10 AC 22 ms
24,480 KB
testcase_11 AC 22 ms
22,452 KB
testcase_12 AC 22 ms
24,480 KB
testcase_13 AC 23 ms
26,512 KB
testcase_14 AC 22 ms
24,476 KB
testcase_15 AC 22 ms
24,608 KB
testcase_16 AC 22 ms
24,476 KB
testcase_17 AC 22 ms
24,756 KB
testcase_18 AC 22 ms
26,776 KB
testcase_19 AC 23 ms
24,476 KB
testcase_20 AC 22 ms
26,652 KB
testcase_21 AC 23 ms
22,448 KB
testcase_22 AC 23 ms
26,652 KB
testcase_23 AC 23 ms
26,648 KB
testcase_24 AC 22 ms
24,756 KB
testcase_25 AC 22 ms
26,400 KB
testcase_26 AC 22 ms
24,472 KB
testcase_27 AC 23 ms
24,884 KB
testcase_28 AC 24 ms
26,264 KB
testcase_29 AC 23 ms
26,644 KB
testcase_30 AC 25 ms
24,756 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;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;
public static class P
{
    public static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        for (int i = 2; i <= 100; i++) n = n.ToString().Sum(x => x - '0');
        Console.WriteLine(n);
    }
}
0