結果
| 問題 | No.2894 Monotonic Intervals |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-09-20 23:58:53 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 103 ms / 2,000 ms |
| + 768µs | |
| コード長 | 359 bytes |
| 記録 | |
| コンパイル時間 | 232 ms |
| コンパイル使用メモリ | 96,460 KB |
| 実行使用メモリ | 107,824 KB |
| 最終ジャッジ日時 | 2026-09-01 07:46:23 |
| 合計ジャッジ時間 | 3,110 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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))))