結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー No
提出日時 2018-01-27 01:23:51
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 473 bytes
コンパイル時間 5,485 ms
コンパイル使用メモリ 105,856 KB
実行使用メモリ 19,328 KB
最終ジャッジ日時 2024-12-28 03:28:48
合計ジャッジ時間 3,290 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 21 WA * 9
権限があれば一括ダウンロードができます
コンパイルメッセージ
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) c += 4;
                else if (i % 5 == 0) c += 4;
                else c += i.ToString().Length;
            }
            Console.WriteLine(c);
        }
    }
}
0