{"problem":{"name":"[GESP202506 二级] 幂和数","description":{"content":"对于正整数 $n$，如果 $n$ 可以表为两个 $2$ 的次幂之和，即 $n = 2^x + 2^y$（$x, y$ 均为非负整数），那么称 $n$ 为幂和数。 给定正整数 $l, r$，请你求出满足 $l \\leq n \\leq r$ 的整数 $n$ 中有多少个幂和数。","description_type":"Markdown"},"platform":"Luogu","limit":{"time_limit":1000,"memory_limit":524288},"difficulty":{"LuoguStyle":"P2"},"is_remote":true,"is_sync":true,"sync_url":null,"sign":"LGB4357"},"statements":[{"statement_type":"Markdown","content":"对于正整数 $n$，如果 $n$ 可以表为两个 $2$ 的次幂之和，即 $n = 2^x + 2^y$（$x, y$ 均为非负整数），那么称 $n$ 为幂和数。\n\n给定正整数 $l, r$，请你求出满足 $l \\leq n \\leq r$ 的整数 $n$ 中有多少个幂和数。\n\n## Input\n\n一行，两个正整数 $l, r$，含义如上。\n\n## Output\n\n输出一行，一个整数，表示 $l, r$ 之间幂和数的数量。\n\n[samples]\n\n## Background\n\n对应的选择、判断题：<https://ti.luogu.com.cn/problemset/1182>\n\n## Note\n\n对于所有测试点，保证 $1 \\leq l \\leq r \\leq 10^4$。","is_translate":false,"language":"English"}],"meta":{"iden":"LGB4357","tags":["2025","进制","循环结构","GESP"],"sample_group":[["2 8","6"],["10 100","20"]],"created_at":"2026-03-03 11:09:25"}}