結果
| 問題 |
No.2894 Monotonic Intervals
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-09-20 23:58:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 157 ms / 2,000 ms |
| コード長 | 359 bytes |
| コンパイル時間 | 352 ms |
| コンパイル使用メモリ | 82,424 KB |
| 実行使用メモリ | 111,372 KB |
| 最終ジャッジ日時 | 2024-09-20 23:58:56 |
| 合計ジャッジ時間 | 2,917 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 |
ソースコード
import os, sys
if os.path.exists("input.txt"):
sys.stdin = open('input.txt', 'r')
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def inp(): return readline().rstrip().decode('utf-8')
def inps(): return map(int, inp().split())
import itertools
inp()
S = inp()
print(len(list(itertools.groupby(S))))