結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー abL8ZLsTbFabL8ZLsTbF
提出日時 2018-02-02 23:35:44
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 65 ms / 1,000 ms
コード長 720 bytes
コンパイル時間 2,167 ms
コンパイル使用メモリ 103,008 KB
実行使用メモリ 24,176 KB
最終ジャッジ日時 2023-09-11 04:25:16
合計ジャッジ時間 5,609 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
24,072 KB
testcase_01 AC 62 ms
24,124 KB
testcase_02 AC 64 ms
22,132 KB
testcase_03 AC 64 ms
22,084 KB
testcase_04 AC 64 ms
24,176 KB
testcase_05 AC 63 ms
22,008 KB
testcase_06 AC 62 ms
22,044 KB
testcase_07 AC 63 ms
19,980 KB
testcase_08 AC 65 ms
24,068 KB
testcase_09 AC 63 ms
24,064 KB
testcase_10 AC 63 ms
22,132 KB
testcase_11 AC 65 ms
22,152 KB
testcase_12 AC 63 ms
22,148 KB
testcase_13 AC 63 ms
22,080 KB
testcase_14 AC 61 ms
22,244 KB
testcase_15 AC 63 ms
22,072 KB
testcase_16 AC 62 ms
22,004 KB
testcase_17 AC 61 ms
22,008 KB
testcase_18 AC 63 ms
19,872 KB
testcase_19 AC 63 ms
22,040 KB
testcase_20 AC 63 ms
22,076 KB
testcase_21 AC 63 ms
22,000 KB
testcase_22 AC 62 ms
22,124 KB
testcase_23 AC 63 ms
20,188 KB
testcase_24 AC 62 ms
24,160 KB
testcase_25 AC 63 ms
22,124 KB
testcase_26 AC 63 ms
21,972 KB
testcase_27 AC 64 ms
21,980 KB
testcase_28 AC 63 ms
22,176 KB
testcase_29 AC 63 ms
22,004 KB
testcase_30 AC 63 ms
22,164 KB
testcase_31 AC 63 ms
24,132 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.Text.RegularExpressions;

class Program
{
    static void Main(string[] args)
    {
        var a = Console.ReadLine().Split().Select(int.Parse);
        int ans = 0;
        foreach (var item in a)
        {
            if (item % 15 == 0)
            {
                ans += 8;
            }
            else if (item % 5 == 0)
            {
                ans += 4;
            }
            else if (item % 3 == 0)
            {
                ans += 4;
            }
            else
            {
                ans += (int)Math.Log(item, 10) + 1;
            }
        }
        Console.WriteLine(ans);
    }
}
0