結果
問題 | No.637 X: Yet Another FizzBuzz Problem |
ユーザー |
|
提出日時 | 2018-06-27 17:52:57 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 29 ms / 1,000 ms |
コード長 | 604 bytes |
コンパイル時間 | 859 ms |
コンパイル使用メモリ | 110,176 KB |
実行使用メモリ | 27,288 KB |
最終ジャッジ日時 | 2024-06-30 23:12:37 |
合計ジャッジ時間 | 2,784 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 30 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using static System.Console; using System.Linq; namespace App { class Prog { static void Main() { var x = ReadLine().Split().Select(int.Parse).ToArray(); int count = 0; for (int i = 0; i < x.Length; i++) { if (x[i] % 3 != 0 && x[i] % 5 != 0) { count += x[i].ToString().Length; continue; } if (x[i] % 3 == 0) count += 4; if (x[i] % 5 == 0) count += 4; } WriteLine(count); } } }