結果

問題 No.2894 Monotonic Intervals
ユーザー loop0919loop0919
提出日時 2024-09-11 16:59:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 63 ms / 2,000 ms
コード長 125 bytes
コンパイル時間 459 ms
コンパイル使用メモリ 82,428 KB
実行使用メモリ 76,556 KB
最終ジャッジ日時 2024-09-11 16:59:03
合計ジャッジ時間 2,397 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
52,284 KB
testcase_01 AC 36 ms
52,664 KB
testcase_02 AC 37 ms
53,336 KB
testcase_03 AC 37 ms
52,912 KB
testcase_04 AC 55 ms
75,944 KB
testcase_05 AC 36 ms
52,016 KB
testcase_06 AC 36 ms
52,424 KB
testcase_07 AC 46 ms
66,120 KB
testcase_08 AC 50 ms
71,284 KB
testcase_09 AC 63 ms
74,444 KB
testcase_10 AC 52 ms
73,040 KB
testcase_11 AC 60 ms
76,284 KB
testcase_12 AC 59 ms
75,956 KB
testcase_13 AC 56 ms
76,556 KB
testcase_14 AC 57 ms
75,932 KB
testcase_15 AC 58 ms
76,360 KB
testcase_16 AC 56 ms
75,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
S = input()

length = 1

for i in range(N - 1):
    if S[i] != S[i + 1]:
        length += 1

print(length)
0