Codefroces 784 愚人节题目(部分)
2 seconds
64 megabytes
standard input
standard output
The input contains a single integer a (1 ≤ a ≤ 30).
Output a single integer.
3
27
史密夫数列
史密夫数(或作史密斯数)是指在某个进位下,它每一位数的数字的和相等於它因数分解(不用指数记数)中每一个因数的位数的和。
391, 438, 454, 483, 517, 526, 535, 562, 576, 588, 627, 634, 636, 645,
648, 654, 663, 666, 690, 706, 728, 729, 762, 778, 825, 852, 861, 895,
913, 915, 922, 958, 985, 1086
#include<iostream>
using namespace std;
int a[]={,,,,,,,,,,,
,,,,,,,,,,
,,,,,,,,,,,};
int main()
{
int n;
while(cin>>n)
{
cout<<a[n]<<endl;
}
return ;
}
2 seconds
64 megabytes
standard input
standard output
Programmers' kids solve this riddle in 5-10 minutes. How fast can you do it?
The input contains a single integer n (0 ≤ n ≤ 2000000000).
Output a single integer.
11
2
14
0
61441
2
571576
10
2128506
3 转换为16进制后数圈圈
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <vector>
#include <queue>
#include <cstdlib>
#include <iomanip>
#include <cmath>
#include <ctime>
#include <map>
#include <set>
using namespace std;
#define lowbit(x) (x&(-x))
#define max(x,y) (x>y?x:y)
#define min(x,y) (x<y?x:y)
#define MAX 100000000000000000
#define MOD 1000000007
#define pi acos(-1.0)
#define ei exp(1)
#define PI 3.141592653589793238462
#define ios() ios::sync_with_stdio(false)
#define INF 0x3f3f3f3f3f
#define mem(a) (memset(a,0,sizeof(a)))
typedef long long ll;
int n,ans=;
int main()
{
scanf("%d",&n);
while(n>=)
{
if(n%==) ans+=;
if(n%==) ans+=;
if(n%==) ans+=;
if(n%==) ans+=;
if(n%==) ans+=;
if(n%==) ans+=;
if(n%==) ans+=;
if(n%==) ans+=;
n/=;
}
if(n==) ans+=;
if(n==) ans+=;
if(n==) ans+=;
if(n==) ans+=;
if(n==) ans+=;
if(n==) ans+=;
if(n==) ans+=;
if(n==) ans+=;
printf("%d\n",ans);
return ;
}
2 seconds
64 megabytes
standard input
standard output
DO YOU EXPECT ME TO FIND THIS OUT?
WHAT BASE AND/XOR LANGUAGE INCLUDES string?
DON'T BYTE OF MORE THAN YOU CAN CHEW
YOU CAN ONLY DISTORT THE LARGEST OF MATHEMATICS SO FAR
SAYING "ABRACADABRA" WITHOUT A MAGIC AND WON'T DO YOU ANY GOOD
THE LAST STACK RUPTURES. ALL DIE. OH, THE EMBARRASSMENT!
I HAVE NO ARRAY AND I MUST SCREAM
ELEMENTS MAY NOT BE STORED IN WEST HYPERSPACE
The first line of input data contains a single integer n (1 ≤ n ≤ 10).
The second line of input data contains n space-separated integers ai (1 ≤ ai ≤ 11).
Output a single integer.
4
2 5 3 1
4
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <vector>
#include <queue>
#include <cstdlib>
#include <iomanip>
#include <cmath>
#include <ctime>
#include <map>
#include <set>
using namespace std;
#define lowbit(x) (x&(-x))
#define max(x,y) (x>y?x:y)
#define min(x,y) (x<y?x:y)
#define MAX 100000000000000000
#define MOD 1000000007
#define pi acos(-1.0)
#define ei exp(1)
#define PI 3.141592653589793238462
#define ios() ios::sync_with_stdio(false)
#define INF 0x3f3f3f3f3f
#define mem(a) (memset(a,0,sizeof(a)))
typedef long long ll;
int n,ans=;
int main()
{
int n,x,ans;
cin>>n;
cin>>x;
ans=x;
for(int i=;i<n;i++)
{
cin>>x;
ans=max(ans,x);
}
printf("%d\n",ans^x);
return ;
}
2 seconds
64 megabytes
standard input
standard output
The only line of the input contains a string of digits. The length of the string is between 1 and 10, inclusive.
Output "Yes" or "No".
373
Yes
121
No
436
Yes
数字回文串
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <vector>
#include <queue>
#include <cstdlib>
#include <iomanip>
#include <cmath>
#include <ctime>
#include <map>
#include <set>
using namespace std;
#define lowbit(x) (x&(-x))
#define max(x,y) (x>y?x:y)
#define min(x,y) (x<y?x:y)
#define MAX 100000000000000000
#define MOD 1000000007
#define pi acos(-1.0)
#define ei exp(1)
#define PI 3.141592653589793238462
#define ios() ios::sync_with_stdio(false)
#define INF 0x3f3f3f3f3f
#define mem(a) (memset(a,0,sizeof(a)))
typedef long long ll;
// 0 1 2 3 4 5 6 7 8 9
int mirror[] = {,-,-, , , , , , , };
int main()
{
char a[];
scanf("%s",&a);
int len=strlen(a);
int i=;
while(a[i]!='\0' && mirror[a[i]-'']==a[len-i-]-'') i++;
puts(i==len?"Yes":"No");
}
2 seconds
64 megabytes
standard input
standard output

The input consists of four lines, each line containing a single digit 0 or 1.
Output a single digit, 0 or 1.
0
1
1
0
0
数字电路,或与非
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <vector>
#include <queue>
#include <cstdlib>
#include <iomanip>
#include <cmath>
#include <ctime>
#include <map>
#include <set>
using namespace std;
#define lowbit(x) (x&(-x))
#define max(x,y) (x>y?x:y)
#define min(x,y) (x<y?x:y)
#define MAX 100000000000000000
#define MOD 1000000007
#define pi acos(-1.0)
#define ei exp(1)
#define PI 3.141592653589793238462
#define ios() ios::sync_with_stdio(false)
#define INF 0x3f3f3f3f3f
#define mem(a) (memset(a,0,sizeof(a)))
typedef long long ll;
int a,b,c,d;
int main()
{
scanf("%d%d%d%d",&a,&b,&c,&d);
printf("%d\n",((a^b)&(c|d))^((b&c)|(a^d)));
return ;
}
Codefroces 784 愚人节题目(部分)的更多相关文章
- luogu[愚人节题目3]现代妖怪殖民地 NTT
U34272 [愚人节题目3]现代妖怪殖民地 fft 题目链接 https://www.luogu.org/problemnew/show/U34272 思路 虽然是个py题. ntt(或者fft)模 ...
- 【luogu T24743 [愚人节题目5]永世隔绝的理想乡】 题解
题意翻译 我们来说说王的故事吧. 星之内海,瞭望之台.从乐园的角落告知汝等.汝等的故事充满了祝福.只有无罪之人可以进入——『永世隔绝的理想乡(Garden of Avalon)』! 题目背景 zcy入 ...
- nyoj 1870 愚人节礼物
愚人节的礼物 Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Subm ...
- 愚人节CDACMFinal
这个啊,愚人节的ACM之赛,其实还是很有意思的.之前因为星期天不能休息还怨声载道,但真的打起来了就是觉得特别有意思. 我们队,最开始乱搞电脑,cmd都没有办法调用了,霎时间十分慌张(而且我过于慌张忘了 ...
- hau 1870 愚人节的礼物(栈)
愚人节的礼物 Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Subm ...
- luogu愚人节比赛划水记
先放链接:愚人节比赛 说好的 不毒瘤 呢?题目都太神奇了吧! 管理员的脑洞orz T1 这个可以说是蒙数据蒙出来的,直接输出"0",AC T2 本机房dalao成功发现" ...
- 【FZYZOJ】愚人节礼物 题解(状压DP)
前言:麻麻我会写状压DP了! ---------------------------- 题目描述 愚人节到了!可爱的UOI小朋友要给孩子们送礼物(汗-原题不是可爱的打败图么= =..).在平面直角坐标 ...
- 愚人节大狂欢 – ADN DevBlog谎话连篇友谊赛
愚人节过去了,你被捉弄了没有? :) 借这个机会,ADN的哥们儿也发泄狂欢了一把,我们4月1号当天在ADN DevBlog上发了一堆谎话连篇的blog,没有一个说实话的,哈哈.这是我们team内部进行 ...
- 巧用CSS文件愚人节恶搞(转)
明天就是4月1日愚人节了,也就是那个可适度开玩笑.整蛊的日子了.如果你想和那些要上网的朋友或同事开个极客式玩笑,那就来试试这个国外网友Wes Bos分享的 CSS 文件吧. 一.打开浏览器的 Cust ...
随机推荐
- IIS集成和经典配置
检測到在集成的托管管道模式下不适用的ASP.NET设置的解决方法(非简单设置为[经典]模式). 我们将ASP.NET程序从IIS6移植到IIS7,可能执行提示下面错误: HTTP 错误 500. ...
- Android设计模式(十二)--抽象工厂模式
问题: 抽象工厂模式,是一个,狠恶心的模式,那么这个模式在Android有没实用到过呢? 1.定义: 抽象工厂模式:为创建一组相关或者是相互依赖的对象提供一个接口,而不须要指定他们的详细类. 2.使用 ...
- java 文件读写demo
分析错误日志: import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; public ...
- openSUSE Leap与 SELS的区别
openSUSE Leap 是 openSUSE 常规发行版本的新名称,在 13.2 之前它仅仅被称为“openSUSE”. 一.openSUSE 发行周期:(15年以前仅有一个openSUSE发行版 ...
- Centos7.6下安装Python3.7
前言 话说不会开发的运维不是一个好的DBA,所以我要开始学习python了,写博客记录一下我的学习过程,另外别欺负我新来的,那个每天更博的技术流ken是我哥. 不说了,时间宝贵,开整. 1.首先来看一 ...
- Spring MVC源码——Servlet WebApplicationContext
上一篇笔记(Spring MVC源码——Root WebApplicationContext)中记录了下 Root WebApplicationContext 的初始化代码.这一篇来看 Servlet ...
- CSUOJ 1555 Inversion Sequence
1555: Inversion Sequence Time Limit: 2 Sec Memory Limit: 256 MBSubmit: 107 Solved: 34 Description ...
- Python3爬虫之爬取某一路径的所有html文件
要离线下载易百教程网站中的所有关于Python的教程,需要将Python教程的首页作为种子url:http://www.yiibai.com/python/,然后按照广度优先(广度优先,使用队列:深度 ...
- java一个月日历
项目须要,获取当天之后的30天.并提示星期几(周几),写了一个工具类 /** * 计算日期时间 * @author shijing * 2015年8月10日下午2:16:09 * @param dat ...
- js插件---评分插件Rating如何使用
js插件---评分插件Rating如何使用 一.总结 一句话总结:form下的input和a标签,input记录值,a标签显示样式 12 <form data-am-rating> 13 ...