{"problem":{"name":"二进制分类","description":{"content":"若将一个正整数化为二进制数，在此二进制数中，我们将数字 $1$ 的个数多于数字 $0$ 的个数的这类二进制数称为 $A$ 类数，否则就称其为 $B$ 类数。 例如： $(13)_{10}=(1101)_2$，其中 $1$ 的个数为 $3$，$0$ 的个数为 $1$，则称此数为 $A$ 类数； $(10)_{10}=(1010)_2$，其中 $1$ 的个数为 $2$，$0$ 的个数也为 $2$","description_type":"Markdown"},"platform":"Luogu","limit":{"time_limit":1000,"memory_limit":131072},"difficulty":{"LuoguStyle":"P1"},"is_remote":true,"is_sync":true,"sync_url":null,"sign":"LGB2140"},"statements":[{"statement_type":"Markdown","content":"若将一个正整数化为二进制数，在此二进制数中，我们将数字 $1$ 的个数多于数字 $0$ 的个数的这类二进制数称为 $A$ 类数，否则就称其为 $B$ 类数。\n\n例如：\n\n$(13)_{10}=(1101)_2$，其中 $1$ 的个数为 $3$，$0$ 的个数为 $1$，则称此数为 $A$ 类数；\n\n$(10)_{10}=(1010)_2$，其中 $1$ 的个数为 $2$，$0$ 的个数也为 $2$，称此数为 $B$ 类数；\n\n$(24)_{10}=(11000)_2$，其中 $1$ 的个数为 $2$，$0$ 的个数为 $3$，则称此数为 $B$ 类数；\n\n程序要求：求出 1~n 之中（$1 \\le n \\le 1000$），全部 $A,B$ 两类数的个数。\n\n## Input\n\n输入 $n$。\n\n## Output\n\n一行，包含两个整数，分别是 $A$ 类数和 $B$ 类数的个数，中间用单个空格隔开。\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"LGB2140","tags":["函数与递归"],"sample_group":[["7\n","5 2\n"]],"created_at":"2026-03-03 11:09:25"}}