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


ryan_022569 (Ryan)

學校 : 臺北市私立延平高級中學
編號 : 69076
來源 : [203.72.178.252]
最後登入時間 :
2019-06-05 17:14:49

#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

#include<bits/stdc++.h>

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

比如:

#include<cmath>

#include<string.h>

#include<string>

等等




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


314159265358979323846264338327 ... (少年π)

學校 : 臺北市私立延平高級中學
編號 : 69058
來源 : [223.137.60.223]
最後登入時間 :
2025-05-23 17:43:44

#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

#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

#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

 

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

請注意你的言詞