結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー NoNo
提出日時 2018-01-27 01:25:26
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 64 ms / 1,000 ms
コード長 532 bytes
コンパイル時間 2,613 ms
コンパイル使用メモリ 104,348 KB
実行使用メモリ 23,984 KB
最終ジャッジ日時 2023-09-11 04:20:39
合計ジャッジ時間 5,967 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
23,984 KB
testcase_01 AC 62 ms
21,840 KB
testcase_02 AC 63 ms
23,964 KB
testcase_03 AC 62 ms
21,684 KB
testcase_04 AC 63 ms
23,836 KB
testcase_05 AC 61 ms
21,864 KB
testcase_06 AC 63 ms
21,920 KB
testcase_07 AC 62 ms
21,732 KB
testcase_08 AC 63 ms
21,776 KB
testcase_09 AC 63 ms
21,908 KB
testcase_10 AC 63 ms
23,972 KB
testcase_11 AC 63 ms
21,860 KB
testcase_12 AC 62 ms
21,880 KB
testcase_13 AC 62 ms
21,812 KB
testcase_14 AC 64 ms
21,836 KB
testcase_15 AC 62 ms
23,932 KB
testcase_16 AC 62 ms
23,772 KB
testcase_17 AC 63 ms
21,884 KB
testcase_18 AC 63 ms
21,864 KB
testcase_19 AC 63 ms
22,036 KB
testcase_20 AC 63 ms
21,964 KB
testcase_21 AC 63 ms
21,868 KB
testcase_22 AC 62 ms
21,844 KB
testcase_23 AC 63 ms
21,748 KB
testcase_24 AC 62 ms
23,868 KB
testcase_25 AC 62 ms
21,916 KB
testcase_26 AC 62 ms
21,900 KB
testcase_27 AC 62 ms
19,776 KB
testcase_28 AC 63 ms
21,816 KB
testcase_29 AC 62 ms
21,912 KB
testcase_30 AC 62 ms
21,964 KB
testcase_31 AC 64 ms
21,920 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.Linq;

namespace y
{
    class Program
    {
        static void Main(string[] args)
        {
            var a = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();
            int c = 0;
            foreach (var i in a)
            {
                if (i % 3 == 0 && i % 5 == 0) c += 8;
                else if (i % 3 == 0) c += 4;
                else if (i % 5 == 0) c += 4;
                else c += i.ToString().Length;
            }
            Console.WriteLine(c);
        }
    }
}
0