摘要:
链接:https://www.nowcoder.com/acm/contest/79/C来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 时间限制:C/C++ 1秒,其他语言2秒 空间限制 阅读全文
摘要:
分析:题目给出一个公式f(n)=n*n+n+41,输入a和b,0<=a<=b<=10000, 问在区间[a,b]中满足f(k)是素数的数所占的百分比。 b的范围不大,直接暴力素数打表即可。 最后输出保留两位小数,卡精度,必须在结果加上1e-5(或者更小)保证精度。 例如,输入 6000 9999,不 阅读全文
摘要:
We all know the Super Powers of this world and how they manage to get advantages in political warfare or even in other sectors. But this is not a poli 阅读全文
摘要:
You task is to find minimal natural number N, so that N! contains exactly Q zeroes on the trail in decimal notation. As you know N! = 1*2*...*N. For e 阅读全文
摘要:
Given two integers, a and b, you should check whether a is divisible by b or not. We know that an integer a is divisible by an integer b if and only i 阅读全文
摘要:
Farey Sequence Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 17894 Accepted: 7179 Description The Farey Sequence Fn for any integer n wit 阅读全文
摘要:
Sigma Function Sigma function is an interesting function in Number Theory. It is denoted by the Greek letter Sigma (σ). This function actually denotes 阅读全文
摘要:
It's said that Aladdin had to solve seven mysteries before getting the Magical Lamp which summons a powerful Genie. Here we are concerned about the fi 阅读全文
摘要:
I was trying to solve problem '1234 - Harmonic Number', I wrote the following code long long H( int n ) { long long res = 0; for( int i = 1; i <= n; i 阅读全文
摘要:
链接:https://www.nowcoder.com/acm/contest/70/E来源:牛客网 题目描述 有一只乌龟,初始在0的位置向右跑。 这只乌龟会依次接到一串指令,指令T表示向后转,指令F表示向前移动一个单位。乌龟不能忽视任何指令。 现在我们要修改其中正好n个指令(一个指令可以被改多次, 阅读全文