結果

問題 No.3259 C++ → Rust → Python
ユーザー amesyu
提出日時 2025-09-06 13:02:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 297 bytes
コンパイル時間 350 ms
コンパイル使用メモリ 82,408 KB
実行使用メモリ 53,860 KB
最終ジャッジ日時 2025-09-06 13:02:36
合計ジャッジ時間 2,041 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

l, r = map(int, input().split())


def lang(x):
    if 1 <= x <= 295:
        return 0
    if 296 <= x <= 416:
        return 1
    if 417 <= x <= 420:
        return 2


change = 0
p = lang(l)

for x in range(l + 1, r + 1):
    if p != lang(x):
        change += 1
    p = lang(x)

print(change)
0