记录编号 |
492443 |
评测结果 |
AAAAAA |
题目名称 |
加法问题 |
最终得分 |
100 |
用户昵称 |
不错封ID几十块 |
是否通过 |
通过 |
代码语言 |
C++ |
运行时间 |
0.027 s |
提交时间 |
2018-03-26 00:41:29 |
内存使用 |
0.24 MiB |
显示代码纯文本
- //Quick read
-
- #include <cstdio>
- #include <cctype>
-
- char tc;
- int nextInt()
- {
- int ans = 0;
- int opt = 1;
- while (tc != EOF && (!isdigit(tc) && tc != '-')) tc = getchar();
- if (tc == '-')
- {
- opt = -1;
- tc = getchar();
- }
- while (tc != EOF && isdigit(tc))
- {
- ans = ans * 10 + tc - '0';
- tc = getchar();
- }
- return (ans * opt);
- }
-
- double nextDouble()
- {
- double ans = 0;
- double b = 0.1;
- double opt = 1;
- while (tc != EOF && (!isdigit(tc) && tc != '-')) tc = getchar();
- if (tc == '-')
- {
- opt = -1;
- tc = getchar();
- }
- while (tc != EOF && isdigit(tc))
- {
- ans = ans * 10 + tc - '0';
- tc = getchar();
- }
- if (tc == '.')
- {
- tc = getchar();
- while (tc != EOF && isdigit(tc))
- {
- ans += (tc - '0') * b;
- b /= 10;
- tc = getchar();
- }
- }
- return ans * opt;
- }
-
- int main()
- {
- freopen("aplusb.in", "r", stdin);
- freopen("aplusb.out", "w", stdout);
- tc = getchar();
- double a = nextDouble(), b = nextDouble();
- printf("%d\n", int(a + b + 1e-7));
- return 0;
- }