結果
問題 | 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 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 45 ms
51,968 KB |
testcase_01 | AC | 45 ms
51,840 KB |
testcase_02 | AC | 45 ms
52,224 KB |
testcase_03 | AC | 45 ms
51,584 KB |
testcase_04 | AC | 57 ms
60,800 KB |
testcase_05 | AC | 45 ms
51,712 KB |
testcase_06 | AC | 47 ms
51,712 KB |
testcase_07 | AC | 66 ms
71,936 KB |
testcase_08 | AC | 68 ms
75,708 KB |
testcase_09 | AC | 71 ms
76,160 KB |
testcase_10 | AC | 69 ms
75,744 KB |
testcase_11 | AC | 72 ms
76,292 KB |
testcase_12 | AC | 73 ms
75,904 KB |
testcase_13 | AC | 71 ms
76,032 KB |
testcase_14 | AC | 74 ms
76,032 KB |
testcase_15 | AC | 70 ms
76,160 KB |
testcase_16 | AC | 69 ms
75,804 KB |
ソースコード
# 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)