Bryce1010模板

#include <bits/stdc++.h>

using namespace std;

#define LL long long

int main()
{
LL n,k;
LL ca=1;
while(cin>>n>>k)
{
if(k<=n)
cout<<"Case #"<<ca++<<": "<<k<<endl;
else
{
LL tmp=(k-n)%(2*(n-1));
// cout<<tmp<<endl;
if(tmp==0)cout<<"Case #"<<ca++<<": "<<n<<endl;
else if(tmp==n-1)cout<<"Case #"<<ca++<<": "<<n-1<<endl;
else
{
cout<<"Case #"<<ca++<<": "<<tmp%(n-1)<<endl;
}
}
}
return 0;
}

K - KazaQ’s Socks的更多相关文章

  1. HDU6043 KazaQ's Socks

    Problem Description KazaQ wears socks everyday. At the beginning, he has n pairs of socks numbered f ...

  2. HDU 6043 KazaQ's Socks (规律)

    Description KazaQ wears socks everyday. At the beginning, he has nn pairs of socks numbered from 11  ...

  3. 2017 Multi-University Training Contest - Team 1 1011&&HDU 6043 KazaQ's Socks【规律题,数学,水】

    KazaQ's Socks Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)T ...

  4. HDU6043 17多校1 KazaQ's Socks 水题

    题目传送:http://acm.hdu.edu.cn/showproblem.php?pid=6043 Problem Description KazaQ wears socks everyday. ...

  5. 杭电 KazaQ's Socks

    KazaQ wears socks everyday. At the beginning, he has n pairs of socks numbered from 1 to n in his cl ...

  6. 2017ACM暑期多校联合训练 - Team 1 1011 HDU 6043 KazaQ's Socks (找规律)

    题目链接 Problem Description KazaQ wears socks everyday. At the beginning, he has n pairs of socks numbe ...

  7. 【多校联合】(HDU6043)KazaQ's Socks

    [多校联合](HDU6043)KazaQ's Socks 一条纯粹的水题,记录下只是因为自己错的太多而已. 原因在于对数据的细节的把握不佳. 原题 KazaQ's Socks Time Limit: ...

  8. 2017 Multi-University Training Contest - Team 1 KazaQ's Socks

    Problem Description KazaQ wears socks everyday. At the beginning, he has n pairs of socks numbered f ...

  9. HDU 6043 - KazaQ's Socks | 2017 Multi-University Training Contest 1

    /* HDU 6043 - KazaQ's Socks [ 找规律 ] | 2017 Multi-University Training Contest 1 题意: 一共 n 双袜子编号 1~n,每天 ...

随机推荐

  1. 我在使用eclipse配置Tomcat服务器的时候发现,默认情况下Tocmat把我们部署的项目放在了workspaces下面,而不是像Myeclipse默认的那样放在tomcat的安装路径下。

    1.我在使用eclipse配置Tomcat服务器的时候发现,默认情况下Tocmat把我们部署的项目放在了workspaces下面,而不是像Myeclipse默认的那样放在tomcat的安装路径下. 2 ...

  2. Md5扩展攻击的原理和应用

    *本文原创作者:Guilty and Innocent,本文属FreeBuf原创奖励计划,未经许可禁止转载 做CTF题目的过程中遇到了md5扩展攻击,参考了几篇文章,感觉写的都有些小缺陷,再发一篇文章 ...

  3. 了解kaggle

    Kaggle官网 数据挖掘的比赛,主要是特征工程 Kaggle 数据挖掘比赛经验分享 Kaggle 机器学习竞赛冠军及优胜者的源代码汇总 程序化广告交易中的点击率预估

  4. AngularJS - $index, $event, $log

    原文: https://thinkster.io/egghead/index-event-log --------------------------------------------------- ...

  5. 【转】Wireshark技巧-过滤规则和显示规则

    原文: http://www.cnblogs.com/icez/p/3973873.html ----------------------------------------------------- ...

  6. 转: java DES的算法片码

    转自: https://www.zhihu.com/question/36767829 作者:郭无心链接:https://www.zhihu.com/question/36767829/answer/ ...

  7. 专题开发十二:JEECG微云高速开发平台-基础用户权限

      专题开发十二:JEECG微云高速开发平台-基础用户权限 11.3.4自己定义button权限 Jeecg中.眼下button权限设置,是通过对平台自己封装的button标签(<t:dgFun ...

  8. hibernate4中HHH000273的错误

    今天配置hibernate4.发现报 17:55:06,815 INFO AbstractPoolBackedDataSource:522 - Initializing c3p0 pool... co ...

  9. antd 离线 icon

    讲你下载下来的官方提供的字体库解压后所有文件复制到node-modules/antd/dist目录下 创建新的文件夹iconfont 在你项目生成的css入口文件对应的源码less文件开始添加如下两句 ...

  10. 当你使用LINQ做底层时,最好设计一个工厂,不要把LINQ的动作暴露给业务层

    1: using System; 2: using System.Collections.Generic; 3: using System.Linq; 4: using System.Text; 5: ...