当前位置: 首页 > news >正文

手机网站跳转百度搜索推广官网

手机网站跳转,百度搜索推广官网,企业网站排名运营,做网站头视频Problem Statement 问题陈述 Alice and Bob are going to play a famous game called Nim. 爱丽丝和鲍勃将要玩一个著名的游戏叫尼姆。 In the game Nim, first they set up stones in K piles containing a1,…,aK stones respectively. 在尼姆游戏中,首先在K堆中…

Problem Statement 问题陈述

Alice and Bob are going to play a famous game called Nim.
爱丽丝和鲍勃将要玩一个著名的游戏叫尼姆。
In the game Nim, first they set up stones in K piles containing a1,…,aK stones respectively.
在尼姆游戏中,首先在K堆中分别设置了包含a1,…,aK的石头。
Then they alternatively take turns (Alice moves first).
然后他们轮流移动(爱丽丝先移动)。
On a player’s turn the player chooses a pile and takes some (at least one) stones from that pile.
轮到玩家时,玩家选择一堆石头,从那堆石头中取出一些(至少一块)。
If there are no piles left which contain any stones, the player loses.
如果没有剩余的包含任何石头的桩,玩家将失败。

Since they like prime numbers very much, they decided to make each ai a prime number less than or equal to L.
因为他们非常喜欢素数,所以他们决定使每个ai都成为小于或等于L的素数。
Given K and L return the number of such initial setups which allows Bob to win, assuming they play optimally, modulo 1,000,000,007.
给定k和l返回允许Bob获胜的初始设置的数量,假设它们发挥的最佳,模100000000007。

Definition 定义

Class: Nim
类别:尼姆
Method: count
方法:计数
Parameters: int, int
参数:int,int
Returns: int
返回:int
Method signature: int count(int K, int L)
方法签名:int count(int k,int l)
(be sure your method is public)
(确保您的方法是公开的)

Notes 笔记

  • Two setups are considered different if at least one ai is different between them (for example, (a1,a2,a3)=(2,5,7) and (2,7,5) are considered different).
  • 如果两个设置之间至少有一个AI不同(例如,(A1、A2、A3)=(2、5、7)和(2、7、5)视为不同),则认为两个设置不同。

Constraints 约束条件

  • K will be between 1 and 1000000000(=109), inclusive.
  • K包含在1和1000000000之间。
  • L will be between 2 and 50000, inclusive.
  • L包含在2和50000之间。

Examples 样例

3
7
Returns: 6
Prime numbers <= 7 are 2, 3, 5 and 7. Bob can win if the initial setup is (2,5,7) or its permutation. So return 3! = 6.

4
13
Returns: 120
Bob can win if the initial setup is (p,p,p,p) for some prime p<=13, (p,p,q,q) or its permutation for p<q<=13, or (3,5,11,13) or its permutation. So return 6+(6C2*6)+4!=6+90+24=120.

10
100
Returns: 294844622

123456789
12345
Returns: 235511047
This problem statement is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. ©2010, TopCoder, Inc. All rights reserved.

http://www.tj-hxxt.cn/news/21466.html

相关文章:

  • 微网站菜单百度最新财报
  • 简述电子商务网站建设的基本流程seo免费工具
  • 网站建设08keji超级外链在线发布
  • 电子商务网站seo上海百度seo优化
  • 创建网站免费注册线上推广方案怎么写
  • 如何360收录网站百度快速排名工具
  • 网站建设教程l北京网站优化哪家好
  • 想做一个自己的网站怎么做防恶意点击软件
  • 网站建设中源码企业邮箱网页版
  • 长春做网站外包nba最新排行榜
  • 怎么做挣钱的网站营销网站都有哪些
  • 网站建设策划书模板百度免费优化
  • 站内推广途径长沙做网站的公司有哪些
  • 网站 营销型世界军事新闻
  • 7年级微机课做网站的软件东莞seo建站排名
  • 唐山市网站建设搜索引擎排名谷歌
  • 有多个网页的大网站如何做手机百度搜索
  • 网站雪花飘落代码建站流程主要有哪些
  • vmware做网站步骤自己做一个网站要多少钱
  • 触屏版网站模板百度优化怎么做
  • 做的网站没法本地上传图片泉州关键词搜索排名
  • 乐清哪里有做网站seo快排
  • 北京网站优化seo嘉兴seo外包平台
  • 永久免费手机网站建设的好处推广普通话的宣传标语
  • 合肥网站设计goz网络营销公司哪家好
  • 网站开发分析报告一个域名大概能卖多少钱
  • 用axure做网站首页百度付费推广有几种方式
  • 实体服务器做网站如何投放网络广告
  • 个人网站备案号可以做企业网站吗app引流推广方法
  • 做轴承生意的网站南昌企业网站建设