上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 63 下一页
摘要: 约数之和 假设现在有两个自然数 $A$ 和 $B$,$S$ 是 $A^B$ 的所有约数之和。 请你求出 $S \bmod 9901$ 的值是多少。 输入格式 在一行中输入用空格隔开的两个整数 $A$ 和 $B$。 输出格式 输出一个整数,代表 $S \bmod 9901$ 的值。 数据范围 $0 \ 阅读全文
posted @ 2023-02-18 11:50 onlyblues 阅读(68) 评论(0) 推荐(0)
摘要: 台阶-Nim游戏 现在,有一个 $n$ 级台阶的楼梯,每级台阶上都有若干个石子,其中第 $i$ 级台阶上有 $a_i$ 个石子$(i \geq 1)$。 两位玩家轮流操作,每次操作可以从任意一级台阶上拿若干个石子放到下一级台阶中(不能不拿)。 已经拿到地面上的石子不能再拿,最后无法进行操作的人视为失 阅读全文
posted @ 2023-02-16 19:01 onlyblues 阅读(97) 评论(0) 推荐(0)
摘要: Nim游戏 给定 $n$ 堆石子,两位玩家轮流操作,每次操作可以从任意一堆石子中拿走任意数量的石子(可以拿完,但不能不拿),最后无法进行操作的人视为失败。 问如果两人都采用最优策略,先手是否必胜。 输入格式 第一行包含整数 $n$。 第二行包含 $n$ 个数字,其中第 $i$ 个数字表示第 $i$ 阅读全文
posted @ 2023-02-15 23:35 onlyblues 阅读(130) 评论(0) 推荐(0)
摘要: 能被整除的数 给定一个整数 $n$ 和 $m$ 个不同的质数 $p_1,p_2, \ldots ,p_m$。 请你求出 $1 \sim n$ 中能被 $p_1,p_2, \ldots ,p_m$ 中的至少一个数整除的整数有多少个。 输入格式 第一行包含整数 $n$ 和 $m$。 第二行包含 $m$ 阅读全文
posted @ 2023-02-14 20:29 onlyblues 阅读(101) 评论(0) 推荐(0)
摘要: D. Moscow Gorillas In winter, the inhabitants of the Moscow Zoo are very bored, in particular, it concerns gorillas. You decided to entertain them and 阅读全文
posted @ 2023-02-13 17:52 onlyblues 阅读(172) 评论(0) 推荐(0)
摘要: B. Fedya and Array For his birthday recently Fedya was given an array $a$ of $n$ integers arranged in a circle, For each pair of neighboring numbers ( 阅读全文
posted @ 2023-02-13 16:22 onlyblues 阅读(75) 评论(0) 推荐(0)
摘要: Subsequence With the Minimum Score You are given two strings $s$ and $t$ . You are allowed to remove any number of characters from the string t. The s 阅读全文
posted @ 2023-02-12 22:54 onlyblues 阅读(39) 评论(0) 推荐(0)
摘要: Substring XOR Queries You are given a binary string s , and a 2D integer array queries where queries[i] = [firsti, secondi] . For the ith query, find 阅读全文
posted @ 2023-02-12 15:49 onlyblues 阅读(52) 评论(0) 推荐(0)
摘要: Count the Number of Fair Pairs Given a 0-indexed integer array nums of size n and two integers lower and upper , return the number of fair pairs. A pa 阅读全文
posted @ 2023-02-12 15:28 onlyblues 阅读(89) 评论(0) 推荐(0)
摘要: 找数字 给定一个正整数 $m$ 和一个非负整数 $s$。 请你找到长度为 $m$ 且各位数字之和为 $s$ 的最小和最大非负整数。 要求所求非负整数不得包含前导零。 输入格式 共一行,两个整数 $m,s$。 输出格式 在一行内输出满足条件的最小和最大非负整数。 如果无解,则输出 -1 -1。 数据范 阅读全文
posted @ 2023-02-12 10:16 onlyblues 阅读(89) 评论(0) 推荐(0)
上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 63 下一页
Web Analytics