Logo
(追記) (追記ここまで)

9483번 - Tandem Repeats 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB180372426.374%

문제

Tandem Repeats occur in DNA when a pattern of one or more nucleotides is repeated,and the repetitions are directly adjacent to each other. For example, consider the sequence:

  • ATTCGATTCGATTCG

This contains 9 Tandem Repeats:

  • ATTCGATTCGATTCG
  • ATTCGATTCGATTCG
  • ATTCGATTCGATTCG
  • ATTCGATTCGATTCG
  • ATTCGATTCGATTCG
  • ATTCGATTCGATTCG
  • ATTCGATTCGATTCG
  • ATTCGATTCGATTCG
  • ATTCGATTCGATTCG

Given a nucleotide sequence, how many Tandem Repeats occur in it?

입력

There will be several test cases in the input. Each test case will consist of a single string on its own line, with from 1 to 100,000 capital letters, consisting only of A, G, T and C. This represents a nucleotide sequence. The input will end with a line with a single 0.

출력

For each test case, output a single integer on its own line, indicating the number Tandem Repeats in the nucleotide sequence. Output no spaces, and do not separate answers with blank lines.

제한

예제 입력 1

AGGA
AGAG
ATTCGATTCGATTCG
0

예제 출력 1

1
1
9

힌트

출처

ICPC > Regionals > North America > Southeast USA Regional > 2013 Southeast USA Regional Programming Contest > Division 1 G번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /