#13004: 給延平的同仁 (應該是AC)


ryan_022569 (Ryan)

學校 : 臺北市私立延平高級中學
編號 : 69076
來源 : [203.72.178.252]
最後登入時間 :
2019-06-05 17:14:49
b294. 經濟大恐荒 -- 板橋高中教學題 | From: [1.171.204.155] | 發表日期 : 2017-11-19 00:07

#include<bits/stdc++.h>
using namespace std;
int main(){
int a;
while(cin>>a){
int sum=0;
for(int i=1;i<=a;i++){
int b;
cin>>b;
sum+=b*i;
}
cout<<sum<<endl;
}
}

 

第一句的意義

https://stackoverflow.com/questions/25311011/how-does-include-bits-stdc-h-work-in-c

 
#16441: Re:給延平的同仁 (應該是AC)


ufve0704 (爬 我爬 我爬爬爬 有排行榜這種東西就是要爬 爬過我上面的那...)

學校 : 臺北市私立延平高級中學
編號 : 83268
來源 : [203.72.178.1]
最後登入時間 :
2023-10-30 13:02:50
b294. 經濟大恐荒 -- 板橋高中教學題 | From: [114.42.220.78] | 發表日期 : 2019-01-01 14:58

#include<bits/stdc++.h>

簡單來說是個包含所有c++#include函數庫

比如:

#include<cmath>

#include<string.h>

#include<string>

等等




 
#16442: Re:給延平的同仁 (應該是AC)


314159265358979323846264338327 ... (少年π)

學校 : 臺北市私立延平高級中學
編號 : 69058
來源 : [223.137.74.225]
最後登入時間 :
2024-04-18 19:26:56
b294. 經濟大恐荒 -- 板橋高中教學題 | From: [223.137.73.62] | 發表日期 : 2019-01-01 15:02

#include<bits/stdc++.h>

簡單來說是個包含所有c++#include函數庫

比如:

#include

#include

#include

等等




以上的程式碼應該只需#include<iostream>就好了

bits/stdc++.h是為了要讓程式設計師不用記太多標頭檔而設計的

 
#17063: Re:給延平的同仁 (應該是AC)


HelloIan (梅子)

學校 : 臺北市私立延平高級中學
編號 : 83262
來源 : [1.162.106.32]
最後登入時間 :
2019-12-01 20:32:51
b294. 經濟大恐荒 -- 板橋高中教學題 | From: [203.72.178.252] | 發表日期 : 2019-03-06 16:43

#include<bits/stdc++.h>
using namespace std;
int main(){
int a;
while(cin>>a){
int sum=0;
for(int i=1;i<=a;i++){
int b;
cin>>b;
sum+=b*i;
}
cout<<sum<<endl;
}
}

 you are ugly

 




 
#17064: Re:給延平的同仁 (應該是AC)


ufve0704 (爬 我爬 我爬爬爬 有排行榜這種東西就是要爬 爬過我上面的那...)

學校 : 臺北市私立延平高級中學
編號 : 83268
來源 : [203.72.178.1]
最後登入時間 :
2023-10-30 13:02:50
b294. 經濟大恐荒 -- 板橋高中教學題 | From: [203.72.178.252] | 發表日期 : 2019-03-06 16:52

#include<bits/stdc++.h>
using namespace std;
int main(){
int a;
while(cin>>a){
int sum=0;
for(int i=1;i<=a;i++){
int b;
cin>>b;
sum+=b*i;
}
cout<<sum<<endl;
}
}

 you are ugly

 

我很清楚你是程設班的哪一個人

請注意你的言詞




 
ZeroJudge Forum