Self powersProblem 48The series, 11 + 22 + 33 + ... + 1010 = 10405071317.Find the last ten digits of the series, 11 + 22 + 33 + ... + 10001000.Answer:9110
原创 2022-08-11 16:55:56
33阅读
Self powersProblem 48The series, 11 + 22 + 33 + ... + 1010 = 10405071317.Find the last ten digits of the series, 11 + 22 + 33 + ... + ...
转载 2017-03-19 09:00:00
31阅读
2评论
The Super Powers 以后还要记得再自己写恩!!!/*#include<iostream>#include<cm
翻译 2022-08-22 21:21:42
47阅读
很难证明出这个合法数列最大值就是3。。然后就好做了假设存在四个数x , x+2^i ,x + 2^j , x + 2^lx+2^j - x-2^i = 2^j - 2^i 要是2的整数倍 j=i+1; 同理 l=j+1 那么第二个数和第四个数就不满足差值是2的幂了QUQ。#include<iostream>#include<cstring>#include<vector>#include<algorithm>#include<map.
原创 2021-07-09 14:04:54
407阅读
0x00 发现一个?可以愉快地写一整行的 self ????????????
原创 2022-10-25 00:07:06
179阅读
题意:找到k个数,并且都是2的多少次幂,这k个数相加等于n,不需要按顺序。思路:看k>n,输出NO,如果k<n,先找出最少的情况所需要数的个数(就
原创 2022-01-10 10:57:13
92阅读
标题手段:他给了一个无限Pascal阵,定义了powers,然后询问power为P的pascal矩阵里面的第R行C列的元素是多少。最開始读错题意了...然后 就成了一个神得不得了的题了。后来请教的别人。感觉能够用矩阵高速幂做。然后,不用高速幂的话,你会惊奇的发现,变成了找规律的题了...答案成了co...
转载 2015-08-08 08:37:00
47阅读
2评论
Three powersTime Limit:1sMemory limit:32MAccepted Submit:96Total Submit:217Consider the set of all non-negative integer powers of 3.  S = { 1, 3, 9, 27, 81, .
原创 2021-08-20 14:51:30
79阅读
In Haskell. Two points: 1. pruning 2. Int suffers from overflow. Integer it is.getPowerSum :: Integer -> [Integer] -> Integer -> IntegergetPowerSum _ ...
转载 2015-03-03 03:16:00
150阅读
2评论
题意是说给出n , k 求出最大的 i 使得 n! % k^i == 0 ...     假设
原创 2022-08-12 13:07:12
26阅读
#include #inclu #include #define OUT freopen("out.txt", "w", stdout) using namespace std; typedef unsigned long long ull; const double key = log(1.0 * ULON
原创 2022-08-17 15:41:54
41阅读
#include<iostream>#include<math.h>using namespace std;#define eps 1e-2 //其他精度数也同样可以int main(){ int n; while(cin>>n&&n) { //n有负数的可能,比如 -1073741824,正解应该是 15, (-4)^15=-1073741824 int t=n>0?1:-1; for(int i=31;i>=1;--i) { double x=ceil(pow(double(n)*t,1.0/i))*t; //向上取整 dou
转载 2011-07-22 22:47:00
33阅读
2评论
可以很简单的发现,当n是奇数的时候,f(n)=φ(n),否则f(n)=0。 所以我们就是求n<=5*10^8且n为奇数的φ的和。 首先我们可以做到用杜教筛算出φ的前缀和,但是如何把偶数的减去? 我们设h(x)为1<=n<=x且n为偶数的φ的和,可以得到: h(x)=Σ(1<=i<=x/2) φ(i)
转载 2018-03-06 10:02:00
63阅读
2评论
#include<bits/stdc++.h>using namespace std;#define rep(i,l,r) for(int i=(l);i<=(r);i++)#define per(i,l,r) for(in
原创 2022-08-16 14:39:12
44阅读
解 Swift 中的元类型:.Type 与 .selfSelf 关键字使用场景只有下面两种:1、Self可以用于协议(protocol)中限制相关的类型2、Self可以用于类(Class)中来充当方法的返回值类型...
转载 2023-05-22 12:01:23
219阅读
Perfect Pth PowersTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 14512Accepted: 3263DescriptionWe say that x is a perfect square if, for some integer b, x = b2. Similarly, x is a perfect cube if, for some integer b, x = b3. More generally, x is a perfect pth power if, for some integer b, x
原创 2021-07-29 16:22:06
160阅读
11752 - The Super PowersTime limit: 1.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=467&page=show_problem&problem=2852We all know the Super Powers
原创 2023-04-12 05:49:31
111阅读
Distinct powersProblem 29Consider all integer combinations of ab for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5:22=4, 23=8, 24=16, 25=3232=9, 33=27, 34=81, 35=24342=16, 43=64, 44=256, 45=102452=25, 5
原创 2022-08-11 15:18:49
25阅读
TO  Self     自己,你好。我是另一个希望看到变得更好的你。今年你大概都不清楚自己多少岁了吧,只是有个模糊的概念,二十一二岁。这不能怪你,大家都说时间是有加速度的,你印象中的年龄变更已经跟不上时间的变更了。二十一二岁,尴尬的年龄,有的小孩开始叫你叔叔了,而有的小孩还是叫你哥哥。这个年纪,你会为有人叫你叔叔而欣喜,因为至少你还在成长,你会为有人叫你哥哥而欢愉,
原创 2014-03-17 21:36:58
399阅读
运行结果:名字为:西西 名字为:北北 小总结 所谓的self,可以理解为自己 可以把它当做C++中类里面的this指针一样理解,就是对象自身的意思,在用某个对象调用该方法时,就将该对象作为第一个参数传递给self
原创 2021-08-13 10:15:32
175阅读
  • 1
  • 2
  • 3
  • 4
  • 5