刚开始直接按题意来写,WA了,唉,果然经验不够..然后开始找规律,本来一看到这种题,第一反应就是规律题,然后看看题意,貌似没啥规律哦!就像当时学DP一样,总是想当然被智商压制了啊喂!

#include<iostream>
#include<cstdio> using namespace std; int main(){
int k;
while(scanf("%d",&k)!=EOF){
if((k-2)%4!=0)
cout<<"no"<<endl;
else
cout<<"yes"<<endl;
}
return 0;
}

hdu 1021的更多相关文章

  1. 【HDU 1021】Fibonacci Again(找规律)

    BUPT2017 wintertraining(16) #5 A HDU - 1021 题意 There are another kind of Fibonacci numbers: F(0) = 7 ...

  2. 同余定理简单应用 - poj2769 - hdu 1021 - hdu 2035

    同余问题 基本定理: 若a,b,c,d是整数,m是正整数, a = b(mod m), c = d(mod m) a+c = b+c(mod m) ac = bc(mod m) ax+cy = bx+ ...

  3. hdu 1021 Fibonacci Again(找规律)

    http://acm.hdu.edu.cn/showproblem.php?pid=1021 Fibonacci Again Time Limit: 2000/1000 MS (Java/Others ...

  4. hdu 1021 Fibonacci Again(变形的斐波那契)

    传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1021 Fibonacci Again Time Limit: 2000/1000 MS (Java/Ot ...

  5. ACM HDU 1021 Fibonacci Again

    #include<iostream> using namespace std; int main() { int n; while(cin>>n) { if((n+1)%4== ...

  6. HDU 1021 - Fibonacci Again

    找规律,分析让 F[N] 每一项对 3 取余的余数: 1,2,0, 2,2,1,0, 1,1,2,0, 2,2,1,0, 1,1,2,0, 2,2,1,0 ......... 显然循环了 #inclu ...

  7. HDU 1021 斐波那契

    参考自:https://www.cnblogs.com/ECJTUACM-873284962/p/6404504.html Fibonacci Again Time Limit: 2000/1000 ...

  8. HDU 1021(斐波那契数与因子3 **)

    题意是说在给定的一种满足每一项等于前两项之和的数列中,判断第 n 项的数字是否为 3 的倍数. 斐波那契数在到第四十多位的时候就会超出 int 存储范围,但是题目问的是是否为 3 的倍数,也就是模 3 ...

  9. HDU 1021 Fibonacci Again【打表找规律】

    Fibonacci Again Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)T ...

随机推荐

  1. 使用MSCOMM发送任意文件,还有一些注意事项

    第一步:发送文件 FILE* pSENDFILE = _wfopen(m_edit_chosefile, _T("rb"));//以二进制打开待发送文件的的文件指针 fseek(p ...

  2. 传递给系统调用的数据区域太小。 (异常来自 HRESULT:0x8007007A)

    在做结构体向字节数组转换的时候,常遇到"传递给系统调用的数据区域太小"的错误,究其原因是因为英文与汉字的编码方式不同,一个汉字等于两个字节,而一个英文字母等于1个字节.所以,对于如 ...

  3. 我的android学习经历20

    WebView的使用 WebView既可以和Intent一样实现界面跳转一样,让系统浏览器打开页面,也可以在应用程序中打开页面 注意用WebView时,需要注册网络服务 代码如下: package c ...

  4. 【leetcode❤python】107. Binary Tree Level Order Traversal II

    #-*- coding: UTF-8 -*- # Definition for a binary tree node.# class TreeNode(object):#     def __init ...

  5. ios runtime的相关知识

    一.iOS runtime原理 对于runtime机制,在网上找到的资料大概就是怎么去用这些东西,以及查看runtime.h头文件中的实现,当然这确实是一种很好的学习方法,但是,其实我们还是不会知道r ...

  6. Quartz:ERROR threw an unhandled Exception

    详细的错误信息如下: -- ::] ERROR org.quartz.core.JobRunShell: - Job group1.job1 threw an unhandled Exception: ...

  7. MySQL(六) —— 运算符和函数

    1. 字符函数   函数名称 描述 CONCAT()         字符连接                             CONCAT_WS()          使用指定的分隔符进行字 ...

  8. Create Hierarchical Tree To Control Records In Oracle Forms

    Download Source Code Providing an example form for creating hierarchical trees in Oracle Forms to co ...

  9. C语言中strdup函数使用方法

    头文件:#include <string.h> 定义函数:char * strdup(const char *s); 函数说明:strdup()会先用malloc()配置与参数s 字符串相 ...

  10. git-github-svn你们都是个什么东东

    Git 和 GitHub 有什么区别  百科中是这样说的 Git是一款免费.开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目. GitHub 是一个面向开源及私有软件项目的托管平台,因为 ...