結果

問題 No.672 最長AB列
コンテスト
ユーザー Ricky-yu
提出日時 2018-07-14 15:18:22
言語 Python3
(3.14.2 + numpy 2.4.0 + scipy 1.16.3)
結果
WA  
実行時間 -
コード長 324 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 262 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-10-10 03:48:37
合計ジャッジ時間 2,548 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 1 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

target_list = input()
eq_count = 0
neq_count = 0

for i in range(len(target_list)-1):
    if target_list[i] == target_list[i+1]:
          eq_count += 1
    else: 
          break
for i in range(len(target_list)-1):
    if target_list[i] != target_list[i+1]:
          neq_count += 1
          
print(eq_count+neq_count)    
0