Multiples of 3 and 5(the answer)
progress:
key:none
code:
#include<stdio.h> #include<math.h> #include<iostream> using namespace std; void Sum_X(int x) { int Count=0; for(int i=1;i<x;i++) { if(i%3==0||i%5==0) Count+=i; //cout<<i<<endl; } cout<< Count; } int main() { int Number; cout<<"Please input the number below: "; cin>>Number; Sum_X(Number); return 0; }
answer: 233168
===========================================================
相關推薦
Multiples of 3 and 5(the answer)
progress: key:none code: #include<stdio.h> #include<math.h> #include<iostream>
Problem1(Multiples of 3 and 5)
一.問題描述 官方問題描述如下: If we list all the natural numbers below 10 that are multiples of
Problem 1 : Multiples of 3 and 5
Multiples of 3 and 5If 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 multi
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 9. The sum of these multiples is 23. Find th
「LOJ#10056」「一本通 2.3 練習 5」The XOR-longest Path (Trie 「LOJ#10050」「一本通 2.3 例 2」The XOR Largest Pair (Trie
#10056. 「一本通 2.3 練習 5」The XOR-longest Path 題目描述 原題來自:POJ 3764 給定一棵 nnn 個點的帶權樹,求樹上最長的異或和路徑。 輸入格式
How browsers work--Behind the scenes of modern web browsers (前端必讀)
層次 優先級 display 忽略 保存 手動 背景 out 循環 瀏覽器可以被認為是使用最廣泛的軟件,本文將介紹瀏覽器的工 作原理,我們將看到,從你在地址欄輸入google.com到你看到google主頁過程中都發生了什麽。 將討論的瀏覽器 今天,有五種主流瀏覽器——IE
The Usage of Lambda and Heap in the C++ STL
ner class eap cto con c++ stl nts been nta The Usage of Lambda and Heap in the C++ STL Heap In c++ STL, the heap had been implemented as
《OpenCV3程式設計入門》——5.2.3 addWeighted()函式(線性混合)(附程式碼詳解)
addWeighted()函式用來計算兩個陣列(影象陣列)的加權和。 格式如下: void addWeighted(InputArray src1, double alpha, InputArray src2, double beta, double gamma, OutputArray
CF676E The Last Fight Between Human and AI(特判)(腦洞)
題意:現在給你一組多項式,給出一箇中間狀態,此時有些係數可能是確定的,有些係數可能是不確定的(用?表示),機器人和人將輪流為未知數設值(由於是中間狀態所以當前第一個設值的人不一定是機器人),給你整數k
【Android 基礎 5.1】Drawables, styles, and themes(夜間模式)
ShapeDrawable <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval"> <st
ElasticSearch 5.3 java Api(增刪改)使用
話不多說,環境是ElasticSearch 安裝教程 可以看這個。我的環境是5.3 + 分詞 。 一、Index的建立 5.x的預設是不會在你插入資料的時候主動建立index的,所以網上其他地方的介紹程式碼,都有問題。你是沒法直接用的。 建
CF438D The Child and Sequence(線段樹)
include efi print ems new 代碼 names for its 題目鏈接:CF原網 洛谷 題目大意:維護一個長度為 $n$ 的正整數序列 $a$,支持單點修改,區間取模,區間求和。共 $m$ 個操作。 $1\le n,m\le 10^5$。其它數
練習5-3 數字金字塔(15 分)
本題要求實現函式輸出n行數字金字塔。 函式介面定義: void pyramid( int n ); 其中n是使用者傳入的引數,為[1, 9]的正整數。要求函式按照如樣例所示的格式打印出n行數字金字塔。注 意每個數字後面跟一個空格。 裁判測試程式樣例: #incl
個人作業3——個人總結(Alpha階段)
view 做成 名詞 估算 支持多語言 擴展 常用模塊 不同的 日誌 1.說到軟件工程作業,很多同學都曾經苦惱過,想放棄。可是,當你堅持寫完的時候,突然間心情大好,發現原來自己能做得到。我也是這樣,缺乏自信心了,沒有人在後面推一把,就很難前進。框架吧,是用來打破的。我們不能
CodeForces 321A Ciel and Robot(數學模擬)
ont amp force 等於 return printf print -- 題意 題目鏈接:http://codeforces.com/problemset/problem/321/A 題意:在一個二維平面中,開始時在(0,0)點,目標點是(a。b),問能不能通過反
個人作業3--個人總結(Alpha階段)
target 愛好 項目 leader 平衡 構建 個人總結 spa 發的 我們也算是經過了一次軟件開發的人了,在Alpha階段過程和結果都不太理想,我們在寫事後諸葛亮會議的時候也感慨了很多,在小組會議的時候也討論了很多,為了完成這次作業,我又翻了翻《構建之法》這本書。這本
hdu(1069)——Monkey and Banana(LIS變形)
res 排序 inf popu 坐標 trac 保存 i++ urn 題意: 如今給你n個石塊,然後它由坐標來表示(x,y,z)。可是它能夠有不同的方法,也就是說它的三個坐標能夠輪換著來的。 石塊的數量不限,可是每次都必須保持上底面的長和寬嚴格遞減,然後問你用這些石塊所
POJ 1979 Red and Black(簡單DFS)
either www enter ont false num present direction roo Red and Black Description There is a rectangular room, covered with square tile
【POJ】1704 Georgia and Bob(Staircase Nim)
row over diff 題目 player 技術分享 需要 ber 排序。 Description Georgia and Bob decide to play a self-invented game. They draw a row of grids on pape
moost — Last.fm's collection of C++ utility libraries(功能很多)
sts timers ash res files functions transacti odi signal libmoost libmoost is a collection of C++ utility libraries, including: algori