Multiples of 3 and 5
#include<stdio.h>
int main(void){
int n1, n2,n3;
n1=333*(3+999)/2;
n2=199*(5+995)/2;
n3=66*(15+990)/2;
printf("%d\n",n1+n2-n3);
n1=getchar();
return 0;
}
Multiples of 3 and 5
Problem 1
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.
算法
Multiples of 3 and 5的更多相关文章
- 【算法题】Multiples of 3 and 5
Multiples of 3 and 5 原题 题意如下: 找出N以内的3和5的倍数的和. 思路 1.刚看到觉得好弱智,直接遍历一遍不就OK了吗?但是第2和第3个测试用例报了TLE,超时. 2.然后想 ...
- 【CSS3】Advanced8:CSS Backgrounds: Multiples, Size, and Origin
1.Multiples,Size,and Origin eg:background-image:url(bg.png),url(bullet.png) 0 50% no-repeat,url(arro ...
- (Problem 1)Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The ...
- Problem 1: Multiples of 3 and 5
小白一枚,python解法,共同学习,一起进步. Problem 1: Multiples of 3 and 5 If we list all the natural numbers below 10 ...
- Codeforces Round #506 (Div. 3) D. Concatenated Multiples
D. Concatenated Multiples You are given an array aa, consisting of nn positive integers. Let's call ...
- R语言学习——欧拉计划(1)Multiples of 3 and 5
[题目一]If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. ...
- 【Project Euler 1】Multiples of 3 and 5
题目要求是: If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and ...
- LightOJ--1149--Factors and Multiples(二分图好题)
Factors and Multiples Time Limit: 2000MS Memory Limit: 32768KB 64bit IO Format: %lld & %llu ...
- Factors and Multiples
Factors and Multiples PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB Y ...
随机推荐
- nfs客户端报错解决Stale file handle
NFS故障: 场景:客户端挂载是好的.服务端磁盘满了,重新给挂了一快.客户端df -h nfs挂载消失. 客户端报错:Stale file handle 现象如下: [root@test63-spri ...
- 清北学堂2017NOIP冬令营入学测试P4749 F’s problem(f)
时间: 1000ms / 空间: 655360KiB / Java类名: Main 背景 冬令营入学测试 描述 这个故事是关于小F的,它有一个怎么样的故事呢. 小F是一个田径爱好者,这天它们城市里正在 ...
- 程序开发使用docker部署
我们公司自己研发了一套 grand-line 系统,使用 docker 来部署项目. 我是第一批小白鼠,一开始网络差,build 一次要半个小时,连接进入 web shell 也很慢,部署一个微信项目 ...
- 详细学习ORACLE JOBS
一点一点学习jobs的各个方面比较长,比较烦,但是应该看完后会对jobs比较好的应用 一.学习准备 开始dbms_job学习前,先认识一个参数job_queue_processes a.job_que ...
- Block Chain, a protocol view
我做了个区块链的文档,给自己扫盲用的,有兴趣的可以看下,主要是自己画示意图比较好理解,示意图之后的专题部分,内容直接取自参考链接.网上的资料都是谈区块链有什么性质.有什么能力.有什么应用之类的,我主要 ...
- lecture8-RNN的训练方法之二三
HInton第8课,之所以说之二三,是因为训练RNN的四种方法之一:长短时记忆在lecture7中介绍过了,这里介绍的是第二和第三种方法:HF优化和Echo (这个字觉得翻译成回声是不是欠妥,所以保留 ...
- Canvas之蛋疼的正方体绘制体验
事情的起因 之前写了篇谈谈文字图片粒子化 I,并且写了个简单的demo -> 粒子化.正当我在为写 谈谈文字图片粒子化II 准备demo时,突然想到能不能用正方体代替demo中的球体粒子.我不禁 ...
- Java:注解(元数据)
初识Java注解 所谓的元数据是指用来描述数据的数据,可能刚听到元数据的时候你会有点陌生,其实任何一个使用过struts或者hibernate的开发人员都在不知不觉中使用元数据,更通俗一点来说元数据是 ...
- NetFPGA
From Wikipedia, the free encyclopedia The NetFPGA project[1] is an effort to develop open source har ...
- tornado和django的结合使用 tornado Server for django WSGI APP
#!/usr/bin/env python # Run this with # Serves by default at # http://localhost:8080/hello-tornado a ...