SWEA 1213 (S/W 문제해결 기본) 3일차 - String

1 개요[ | ]

SWEA 1213 (S/W 문제해결 기본) 3일차 - String
SW Expert 아카데미
# 문제 풀이

틀:SWEA 난이도 3-8

2 C++[ | ]

3 Java[ | ]

import java.util.*;
public class Solution {
	static Scanner sc  = new Scanner(System.in);
	public static void main(String[] args) {
		for(int tt=1; tt<=10; tt++) {
			int tc = sc.nextInt();
			String needle = sc.next();
			String haystack = sc.next();
			System.out.format("#%d %d\n", tc, haystack.split(needle,-1).length-1);
		}
	}
}

4 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}