UOJ Logo

NOI.AC

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#176208#1. A+B ProblemDE_aemmprty1000ms1160kbC++1.3kb2023-07-27 21:16:122023-07-27 21:16:14

answer

/*
things to check :
1.  int overflow or long long memory need
2.  recursion / array / binary search / dp / loop bounds
3.  precision
4.  special cases (n = 1,bounds)
5.  delete debug statements
6.  initialize(especially multi-tests)
7.  = or ==, n or m, ++ or --, i or j, > or >=, < or <=
8.  keep it simple and stupid
9.  do not delete, use // instead
10. operator priority
11. is there anything extra to output?
12. ...

something to think about :
1. greedy? dp? searching? dp with matrix/ segment tree? binary search?
2. If contains "not", why not ?????? or few affect?
3. Take care of the data ranges.
*/
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2")
#include <bits/stdc++.h>
using namespace std;

#define int long long
#define f(i,a,b) for(register int i = a; i <= b; i ++)
#define g(i,b,a) for(register int i = b; i >= a; i --)
#define CI const int

int read() {
    char c = getchar();
    int x = 0, p = 1;
    while ((c < '0' || c > '9') && c != '-') c = getchar();
    if (c == '-') p = -1, c = getchar();
    while (c >= '0' && c <= '9')
        x = (x << 1) + (x << 3) + (c ^ 48), c = getchar();
    return x * p;
}

signed main() {
    int a = read(), b = read();
    int res = 0;
    while (a --) res ++;
    while (b --) res ++;
    cout << res << "\n";
    return 0;
}

Details

小提示:点击横条可展开更详细的信息

Test #1:

score: 10
Accepted
time: 0ms
memory: 1160kb

input:

23 24

output:

47

result:

ok 1 number(s): "47"

Test #2:

score: 10
Accepted
time: 0ms
memory: 1156kb

input:

233 1

output:

234

result:

ok 1 number(s): "234"

Test #3:

score: 10
Accepted
time: 0ms
memory: 1160kb

input:

222 333

output:

555

result:

ok 1 number(s): "555"

Test #4:

score: 10
Accepted
time: 0ms
memory: 1160kb

input:

1 333

output:

334

result:

ok 1 number(s): "334"

Test #5:

score: 10
Accepted
time: 0ms
memory: 1156kb

input:

222 333

output:

555

result:

ok 1 number(s): "555"

Test #6:

score: 10
Accepted
time: 0ms
memory: 1160kb

input:

242 333

output:

575

result:

ok 1 number(s): "575"

Test #7:

score: 10
Accepted
time: 0ms
memory: 1156kb

input:

222 3330

output:

3552

result:

ok 1 number(s): "3552"

Test #8:

score: 10
Accepted
time: 0ms
memory: 1156kb

input:

2220 333

output:

2553

result:

ok 1 number(s): "2553"

Test #9:

score: 10
Accepted
time: 0ms
memory: 1160kb

input:

222 555

output:

777

result:

ok 1 number(s): "777"

Test #10:

score: 10
Accepted
time: 0ms
memory: 1156kb

input:

222 3333

output:

3555

result:

ok 1 number(s): "3555"

Extra Test:

score: 0
Extra Test Passed