(1+x)^n
#include<stdio.h>
int main()
{
int n,i;
while(scanf("%d %d",&n,&i)!=EOF)
{
if((n&i)==i)//这里&是按位与运算符
printf("1\n");
else
printf("0\n");
}
return ;
}
随机推荐
- CF293E Close Vertice
如果没有边数限制就是裸的淀粉质,如果有了加上一个树状数组记边数就行了. #include<stdio.h> #include<stdlib.h> #include<str ...
- 从xml中返回的对象,和new 返回的对象时不同的。
public BigDecimal getTax() { return tax == null ? BigDecimal.ZERO : tax; } 这是自定义的一个类 对null 做出了处理. 但是 ...
- 【spark core学习---算子总结(java版本) (第1部分)】
map算子 flatMap算子 mapParitions算子 filter算子 mapParttionsWithIndex算子 sample算子 distinct算子 groupByKey算子 red ...
- Java的反射是什么?有什么用?
首先我要简单的来说一下什么是Java的反射机制: 在Java里面一个类有两种状态--编译和运行状态,通常我们需要获取这个类的信息都是在编译阶段获得的,也就是直接点出来或者new出来,可是如果需要在类运 ...
- Struts2 入门笔记
一.介绍 1.Struts网站 https://struts.apache.org/ struts 是通过基于请求响应模式的应用framework 1) 控制器(Controller)--控制整个Fr ...
- VS code写stm32
第一次在知乎写博客,献丑了. VS code写stm32 今天实在觉得KEIL太丑,突然想到VS code也可以实现STM32代码的编写,遂决定写一个文章,把VScode变成一个STM32的IDE ...
- Googletest - Google Testing and Mocking Framework
Googletest - Google Testing and Mocking Framework https://github.com/google/googletest
- android: requestLayout(), invalidate(), postInvalidate() 方法区别
一.invalidate和postInvalidate 这两个方法都是在重绘当前控件的时候调用的.invalidate在UI线程中调用,postInvalidate在非UI线程中调用.因为androi ...
- IDEA启动tomcat报错:java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContext、ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component
先看错误日志: -May- ::.M26 -May- :: :: UTC -May- ::29.845 信息 [main] org.apache.catalina.startup.VersionLog ...
- java最简单复制文件方法,不依赖任何框架
java最简单复制文件方法 把java2.txt内容复制到java.txt中 import java.io.File; import java.io.IOException; import jav ...