2010/6/12 yanhua <span dir="ltr"><<a href="mailto:gasfans@163.com">gasfans@163.com</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
hi,all!<br>
it's a simple question:<br>
input two integers A and B in a line,output A+B?<br>
<br>
this is my program:<br>
s = input()<br>
t = s.split()<br>
a = int(t[0])<br>
b = int(t[1])<br>
print(a+b)<br>
<br>
but i think it's too complex,can anybody tell to slove it with less code.<br><font color="#888888">
--</font><br></blockquote><div><font color="#888888"><br><span style="color: rgb(0, 0, 0);">The reason it looks complicated is because you're using one variable for everything you do. Look at others' answers - most of them are simply combining them into one line.<br>
<br>Cheers,<br>Xav</span></font><span style="color: rgb(0, 0, 0);"></span></div></div>