結果

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

ソースコード

diff #

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