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ubx/+XPTaZy4vXlMjOVsxmy22eLwQyxbxEvoOhEA+Cxy2SK4jmOXAHqDJyLtFsvZ1e3lxfL+rmmBuP7TjO4cvU5k/yrZAgC+stFscbXsX4O63abGWzw97pLE8uZ62aaKTptHbyzndrs9NGwU9InsZzh0eQyzxX6lYzfdAgDexsg1qE3VXnqdSO8+m03LRHszjIJskWu3kC0A4LPLjrd4evwTuXfWdlucLcLLOmQLAPgOJtyXMzmQMxjO2c0WnStCS8db6BMBgK/siHt+b7dl7Rb7edp7UaQWmGy3eAzmly0A4Gt4s2yRrONf+td9TM8WBf9kCwD4GG+ULXa9G7HHjLU312r1s8V1e3PPzs24Cmm3AIAPNZotAAAmkC0AgJpkCwCgJtkCAKhJtgAAapItAICaZAsAoKZctvgPAOC///77779q2eJ/AMC3J1sAADXJFgBATbIFAFCTbAEA1CRbAAA1yRYAQE2yBQBQk2wBANQkWwAANckWAEBN75otfv+ctX78+vsOmwcAvLOParf4/XM2+/n7rbYKAPgoH9Yn8vunpgsAOEMflC3+/vqh2QIAztF7Z4t2yIVGCwA4Sx/ZJ6LlAgDOz8ddg2rABQCco4/KFn9//dBuAQBn6D2zxd9fP9zfAgDOnPtyAgA1yRYAQE2yBQBQk2wBANQkWwAANckWAEBNsgUAUJNsAQDUJFsAADXJFgBATbIFAFCTbAEA1PT+2eLwxDKPKwOA8/O+2cKT1QHg3L1rtvj9U1sFAJy598wWv3/Ofvz69XOmSwQAztc7Z4ugR+T3T90jAHB+3r3d4m/qVwDgHLx3u0XQUiFbAMAZeu+xnG2c+Pvrh2gBAOfnne9vcbi5hWABAGfJfTkBgJpkCwCgJtkCAKhJtgAAapItAICaZAsAoCbZAgCoSbYAAGqSLQCAmmQLAKAm2QIAqKlmtgAA+K9WtgAAmEq2AABqki0AgJpkCwCgJtkCAKhJtgAAapItAICaZAsAoCbZAgCoSbYAAGqSLQCAmmQLAKCm/wfv/K5Z1oBlhAAAAABJRU5ErkJggg==" alt="" />
---------------------------------------
相邻的两个自然数互质,所以与n互质并且不大于n的最大数就是n-1了,还有就是稍微注意一下数据范围。
AC代码:
import java.math.BigInteger;
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in);
int times=sc.nextInt();
while(times-->0) System.out.println(sc.nextBigInteger().subtract(BigInteger.ONE)); } }
题目来源: http://acm.nyist.net/JudgeOnline/problem.php?pid=1047
NYOJ题目1047欧几里得的更多相关文章
- GCD nyoj 1007 (欧拉函数+欧几里得)
GCD nyoj 1007 (欧拉函数+欧几里得) GCD 时间限制:1000 ms | 内存限制:65535 KB 难度:3 描述 The greatest common divisor ...
- NOIP2012拓展欧几里得
拉板题,,,不说话 我之前是不是说过数据结构很烦,,,我想收回,,,今天开始的数论还要恶心,一早上听得头都晕了 先来一发欧几里得拓展裸 #include <cstdio> void gcd ...
- Intel Code Challenge Final Round (Div. 1 + Div. 2, Combined) C.Ray Tracing (模拟或扩展欧几里得)
http://codeforces.com/contest/724/problem/C 题目大意: 在一个n*m的盒子里,从(0,0)射出一条每秒位移为(1,1)的射线,遵从反射定律,给出k个点,求射 ...
- UVA 12169 Disgruntled Judge 枚举+扩展欧几里得
题目大意:有3个整数 x[1], a, b 满足递推式x[i]=(a*x[i-1]+b)mod 10001.由这个递推式计算出了长度为2T的数列,现在要求输入x[1],x[3],......x[2T- ...
- POJ 1061 青蛙的约会 扩展欧几里得
扩展欧几里得模板套一下就A了,不过要注意刚好整除的时候,代码中有注释 #include <iostream> #include <cstdio> #include <cs ...
- bzoj4517: [Sdoi2016]排列计数--数学+拓展欧几里得
这道题是数学题,由题目可知,m个稳定数的取法是Cnm 然后剩下n-m本书,由于编号为i的书不能放在i位置,因此其方法数应由错排公式决定,即D(n-m) 错排公式:D[i]=(i-1)*(D[i-1]+ ...
- POJ 2891 Strange Way to Express Integers(拓展欧几里得)
Description Elina is reading a book written by Rujia Liu, which introduces a strange way to express ...
- BZOJ-1407 Savage 枚举+拓展欧几里得(+中国剩余定理??)
zky学长实力ACM赛制测试,和 大新闻(YveH) 和 华莱士(hjxcpg) 组队...2h 10T,开始 分工我搞A,大新闻B,华莱士C,于是开搞: 然而第一题巨鬼畜,想了40min发现似乎不可 ...
- poj 1061 扩展欧几里得解同余方程(求最小非负整数解)
题目可以转化成求关于t的同余方程的最小非负数解: x+m*t≡y+n*t (mod L) 该方程又可以转化成: k*L+(n-m)*t=x-y 利用扩展欧几里得可以解决这个问题: eg:对于方程ax+ ...
随机推荐
- 将一个div始终定位在屏幕中心
//div的id为box #box{ width:200px; heighti:200px; border:1px solid #f00; //重点是以下规则 position:absolute; t ...
- HNU 12885 Bad Signal(模拟)
题目链接:http://acm.hnu.cn/online/?action=problem&type=show&id=12885&courseid=274 解题报告:一共有n个 ...
- 爆料喽!!!开源日志库Logger的剖析分析
导读 Logger类提供了多种方法来处理日志活动.上一篇介绍了开源日志库Logger的使用,今天我主要来分析Logger实现的原理. 库的整体架构图 详细剖析 我们从使用的角度来对Logger库抽茧剥 ...
- windowSoftInputMode属性讲解
windowSoftInputMode属性讲解(下面这段内容我参考别人的博客,并加入我的一些意见) 我们从这个属性的名称中,可以很直观的看出它的作用,这个属性就是来设置窗口软键盘的交互模式的.andr ...
- SSH-Struts第四弹:Struts2学习过程中遇到的问题
1.2014-03-27 22:03:10 问题点:在struts.xml中进行常量的配置:devMode=true不起作用,还是必须重新启动tomcat,才能使修改过的struts.xml和Acti ...
- am335x UART1输入u-boot 调试信息代码修改
AM335x 调试信息UART1输出代码修改1. 关于pin_mux 的配置代码修改位置:/board/forlinx/ok335x/mux.c void enable_uart0_pin_mux( ...
- transition第一次没有效果
原因很简单因为一开始没有设定要改变的样式的初始值 例如你要改的是top:-50; 那一开始就要设top:0; 不然第一次不会有动画效果移动
- Python自动化之YAML解析
准备工作 pip install PyYAML import yaml yaml语法规则 想要表示列表项,使用一个短横杠加一个空格.多个项使用同样的缩进级别作为同一列表的一部分 my_dictiona ...
- RPC(Remote Procedure Call Protocol)——远程过程调用协议 学习总结
首先了解什么叫RPC,为什么要RPC,RPC是指远程过程调用,也就是说两台服务器A,B,一个应用部署在A服务器上,想要调用B服务器上应用提供的函数/方法,由于不在一个内存空间,不能直接调用,需 ...
- centos 终端 字体颜色
默认情况下,没有颜色. https://www.centos.org/docs/2/rhl-gsg-en-7.2/ls-color.html git也默认没有颜色,破解如下: git config - ...