結果
| 問題 |
No.2894 Monotonic Intervals
|
| コンテスト | |
| ユーザー |
timi
|
| 提出日時 | 2024-09-20 21:24:24 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 74 ms / 2,000 ms |
| コード長 | 321 bytes |
| コンパイル時間 | 266 ms |
| コンパイル使用メモリ | 82,532 KB |
| 実行使用メモリ | 76,292 KB |
| 最終ジャッジ日時 | 2024-09-20 21:24:27 |
| 合計ジャッジ時間 | 2,147 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 |
ソースコード
# import heapq
# from heapq import heappop,heappush,heapify
# from sys import stdin, setrecursionlimit
# input = stdin.readline
# readline = stdin.readline
# from collections import deque,defaultdict
#N,Q=map(int, input().split())
now='?'
N=int(input())
S=input()
c=0
for s in S:
if now!=s:
c+=1
now=s
print(c)
timi