{"trustable":false,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"PLAIN","content":"\u003cdiv class\u003d\"panel_content\"\u003e\n Hey, welcome to HDOJ(Hangzhou Dianzi University Online Judge).\n \u003cbr\u003e\n \u003cbr\u003eIn this problem, your task is to calculate SUM(n) \u003d 1 + 2 + 3 + ... + n.\n \u003cbr\u003e\n\u003c/div\u003e"}},{"title":"Input","value":{"format":"PLAIN","content":"The input will consist of a series of integers n, one integer per line.\n\u003cbr\u003e"}},{"title":"Output","value":{"format":"PLAIN","content":"For each case, output SUM(n) in one line, followed by a blank line. You may assume the result will be in the range of 32-bit signed integer.\n\u003cbr\u003e"}},{"title":"Sample Input","value":{"format":"PLAIN","content":"\u003cpre\u003e1\n100\n\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"PLAIN","content":"\u003cpre\u003e1\n\n5050\n\n\u003c/pre\u003e"}},{"title":"","value":{"format":"PLAIN","content":"#include\u003ciostream\u003e\n#include\u003ccstdio\u003e\nusing namespace std;\nint main()\n{\n\tint n;\n\tint m;\n\tcin\u003e\u003en;\n\tgetchar();\n\tcin\u003e\u003em;\n\tint sum\u003d0;\n\tfor(int i\u003d1;i\u003c\u003dm;i++)\n\t{\n\t\tsum\u003dsum+i;\n\t}\n\tcout\u003c\u003cn\u003c\u003cendl\u003c\u003cendl;;\n\tcout\u003c\u003csum;\n\treturn 0;\n } "}}]}