結果
問題 | No.430 文字列検索 |
ユーザー |
![]() |
提出日時 | 2016-10-07 16:51:39 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 435 bytes |
コンパイル時間 | 688 ms |
コンパイル使用メモリ | 103,040 KB |
実行使用メモリ | 34,776 KB |
最終ジャッジ日時 | 2024-11-10 00:09:57 |
合計ジャッジ時間 | 5,227 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 4 |
other | AC * 1 WA * 1 TLE * 1 -- * 11 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Linq; class Program { static void Main(string[] args) { string S = Console.ReadLine(); int M = int.Parse(Console.ReadLine()); string C = ""; int count = 0; for (int i = 0; i <= M - 1; i++) { C = Console.ReadLine(); count += (S.Length - S.Replace(C, "").Length) / C.Length; } Console.WriteLine(count); } }