A. Arpa’s hard exam and Mehrdad’s naive cheat 1000 / 数论 找规律

Posted 幽殇默

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了A. Arpa’s hard exam and Mehrdad’s naive cheat 1000 / 数论 找规律相关的知识,希望对你有一定的参考价值。


https://codeforces.com/problemset/problem/742/A

#include<bits/stdc++.h>
using namespace std;
int ans[25]={0,8,4,2,6,8,4,2,6};
int main(void)
{
	int n; cin>>n;
	if(n)cout<<ans[n%4+4];
	else cout<<1; 
	return 0;
}

以上是关于A. Arpa’s hard exam and Mehrdad’s naive cheat 1000 / 数论 找规律的主要内容,如果未能解决你的问题,请参考以下文章

Arpa’s hard exam and Mehrdad’s naive cheat CodeForces - 742A (大水题)

Arpa and an exam about geometry(codeforces 851B)

Arpa’s obvious problem and Mehrdad’s terrible solution 思维

codeforcesB - Arpa’s obvious problem and Mehrdad’s terrible solution 思维

并查集+背包 CF741B Arpa's weak amphitheater and Mehrdad's valuable Hoses

CF741B Arpa's weak amphitheater and Mehrdad's valuable Hoses 并查集 01背包