mirror of
https://github.com/yanfeizhang/coder-kung-fu.git
synced 2026-02-09 13:25:25 +08:00
19 lines
278 B
C
19 lines
278 B
C
# include <stdio.h>
|
|
|
|
#define likely(x) __builtin_expect(!!(x), 1)
|
|
#define unlikely(x) __builtin_expect(!!(x), 0)
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
int n;
|
|
n = atoi (argv[1]);
|
|
|
|
if (likely(n == 10)){
|
|
n = n + 2;
|
|
} else {
|
|
n = n - 2;
|
|
}
|
|
printf("%d\n", n);
|
|
return 0;
|
|
}
|