結果

問題 No.3259 C++ → Rust → Python
コンテスト
ユーザー Yakumo221
提出日時 2025-09-06 13:04:09
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 65 ms / 2,000 ms
+ 381µs
コード長 258 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 237 ms
コンパイル使用メモリ 96,496 KB
実行使用メモリ 78,976 KB
最終ジャッジ日時 2026-07-14 18:15:47
合計ジャッジ時間 3,225 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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

cnt = 0

if l <= 295:
	lang = "c"
elif l <= 416:
	lang = "r"
else:
	lang = "p"

for i in range(l, r+1):
	if i <= 295:
		nl = "c"
	elif i <= 416:
		nl = "r"
	else:
		nl = "p"
	if lang != nl:
		cnt += 1
	
	lang = nl

print(cnt)
0