結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー shima1104shima1104
提出日時 2019-03-12 18:39:39
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 59 ms / 1,000 ms
コード長 805 bytes
コンパイル時間 1,952 ms
コンパイル使用メモリ 98,336 KB
実行使用メモリ 22,792 KB
最終ジャッジ日時 2023-09-05 20:23:15
合計ジャッジ時間 5,232 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
22,792 KB
testcase_01 AC 56 ms
22,704 KB
testcase_02 AC 56 ms
20,636 KB
testcase_03 AC 57 ms
20,708 KB
testcase_04 AC 57 ms
20,676 KB
testcase_05 AC 57 ms
20,820 KB
testcase_06 AC 56 ms
20,696 KB
testcase_07 AC 56 ms
20,720 KB
testcase_08 AC 56 ms
20,668 KB
testcase_09 AC 56 ms
20,844 KB
testcase_10 AC 56 ms
18,656 KB
testcase_11 AC 57 ms
22,708 KB
testcase_12 AC 58 ms
22,712 KB
testcase_13 AC 56 ms
20,652 KB
testcase_14 AC 56 ms
22,716 KB
testcase_15 AC 56 ms
22,708 KB
testcase_16 AC 56 ms
18,748 KB
testcase_17 AC 57 ms
22,748 KB
testcase_18 AC 56 ms
20,928 KB
testcase_19 AC 56 ms
20,688 KB
testcase_20 AC 55 ms
20,848 KB
testcase_21 AC 55 ms
22,720 KB
testcase_22 AC 56 ms
20,800 KB
testcase_23 AC 56 ms
20,848 KB
testcase_24 AC 57 ms
22,752 KB
testcase_25 AC 56 ms
18,704 KB
testcase_26 AC 56 ms
22,784 KB
testcase_27 AC 59 ms
22,712 KB
testcase_28 AC 57 ms
20,708 KB
testcase_29 AC 58 ms
20,812 KB
testcase_30 AC 56 ms
20,700 KB
testcase_31 AC 56 ms
18,780 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace test_2
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] n = Console.ReadLine().Split(' ');

            int sum = 0;

            for(int i= 0; i < n.Length; i++)
            {
                if (int.Parse(n[i]) % 5 == 0 && int.Parse(n[i]) % 3 == 0)
                {
                    sum += 8;

                }
                else if (int.Parse(n[i]) % 5 == 0) {
                    sum += 4;

                }
                else if (int.Parse(n[i]) % 3 == 0)
                {
                    sum += 4;

                }
                else
                {
                    sum += n[i].ToString().Length;

                }
               
            }
            Console.WriteLine(sum);

        }
    }
}
0