lucas1522 @ 2020-01-27 21:30:52
输入迭代器,您值得拥有
#include<bits/stdc++.h>
std::istream_iterator<int> in(std::cin),eof;
main(){
std::cout<<std::accumulate(in,eof,0);
}
by panyf @ 2020-01-27 21:52:45
有更短的C++11代码么
#include<ios>
main(){int a,b;scanf("%d%d",&a,&b);printf("%d",a+b);}
by panyf @ 2020-01-27 21:53:11
不加头文件好像只能用C语言,不能用C++11
by ud2_ @ 2020-01-27 21:54:13
48 bytes:
main(a,b){scanf("%d%d",&a,&b);printf("%d",a+b);}
by zhy137036 @ 2020-01-27 21:54:48
@Mr_Wu 这都能通过?!
by panyf @ 2020-01-27 21:56:02
68B,C++11,求超越(只能交C语言的不算,必须用C++11)https://www.luogu.com.cn/record/29752197
by Mr_Wu @ 2020-01-27 22:15:33
@AK新手村 虽然很无聊,但是还是要说,这个确实可以写 66B。。
#include<iostream>
main(){int a,b;std::cin>>a>>b;std::cout<<a+b;}
虽然本质没变。。
by tiger0133 @ 2020-01-27 22:16:35
怎么总是有人上来就叫嚣最短……
by tiger0133 @ 2020-01-27 22:16:43
% wyy
by Mr_Wu @ 2020-01-27 22:17:37
@tiger0133 %%% 神虎
我只能颓废,而您拿奖杯
by tiger0133 @ 2020-01-27 22:54:41
@Mr_Wu %%% wyy
我甚至不会颓废,只会自闭