最短代码

dinosaurgy 2019-05-31 22:12:06 2019-05-31 22:19:05 24

最短代码,不服者来战

2行

#include<iostream>
int main(){	int n,a[105],sum=0;std::cin>>n;for(int i=1;i<=n;i++){std::cin>>a[i];sum+=a[i];}std::cout<<sum;}
{{ vote && vote.total.up }}

共 17 条回复

wyh15 Minecraft

e... ...

wyh15 Minecraft

r23r32r23r23r23r23r23r32r32r23r2r2332

smt123

#include

outman008

88B

#include<iostream>
int n,t,s;main(){for(std::cin>>n;n--;s+=t)std::cin>>t;std::cout<<s;}
outman008

89B!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

#include<iostream>
int n,t,s;main(){std::cin>>n;for(;n--;s+=t)std::cin>>t;std::cout<<s;}
outman008

91B

#include<iostream>
int n,t,s;main(){std::cin>>n;while(n--&&std::cin>>t)s+=t;std::cout<<s;}
outman008

95B

#include<iostream>
int n,t,s;int main(){std::cin>>n;while(n--&&std::cin>>t)s+=t;std::cout<<s;}
outman008

96B

#include<iostream>
int n,t,s;int main(){std::cin>>n;while(n--){std::cin>>t;s+=t;}std::cout<<s;}
outman008

98B

#include<iostream>
int main(){int n,t,s=0;std::cin>>n;while(n--){std::cin>>t;s+=t;}std::cout<<s;}
jxy11

就少了一内内