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


ryan_022569 (Ryan)


#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 (爬 我爬 我爬爬爬 有排行榜這種東西就是要爬 爬過我上面的那...)


#include<bits/stdc++.h>

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

比如:

#include<cmath>

#include<string.h>

#include<string>

等等




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


314159265358979323846264338327 ... (少年π)


#include<bits/stdc++.h>

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

比如:

#include

#include

#include

等等




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

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

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


HelloIan (梅子)


#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 (爬 我爬 我爬爬爬 有排行榜這種東西就是要爬 爬過我上面的那...)


#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

 

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

請注意你的言詞