/*
자료형
정수 int %d
long long int %lld
실수 float %f
double %lf
문자 char %c
decimal 십진수
*/
/*#include <stdio.h>
int main()
{
unsigned int n;
scanf("%u",&n);
printf("%u",n);
return 0;
}*/
/*#include <stdio.h>
int main()
{
double n;
scanf("%lf",&n);
printf("%.11lf",n);
return 0;
}*/
/*
#include <stdio.h>
int main()
{
int n;
scanf("%d", &n);
printf("%x",n);
return 0;
}
*/
/*#include <stdio.h>
int main()
{
int n;
scanf("%d",&n);
printf("%o",n);
return 0;
}*/
/*#include <stdio.h>
int main()
{
int n;
scanf("%d",&n);
printf("%x",n);
return 0;
}*/
/*#include <stdio.h>
int main()
{
int n;
scanf("%d",&n);
printf("%X",n);
return 0;
}*/
/*#include <stdio.h>
int main()
{
int n;
scanf("%o",&n);
printf("%d",n);
return 0;
}*/
/*#include <stdio.h>
int main()
{
int n;
scanf("%x",&n);
printf("%o",n);
return 0;
}
산술연산자
+ - * / %\
overflow
int -2147483648 ~ +2147483647
5/2 2(몫)
5%2 1(나머지)
(float)5/2.0 2.5
강제형변환 casting
실수/정수
정수/실수
실수/실수 -> 실수
1038-1046
*/
/*#include <stdio.h>
int main()
{
int x,y;
scanf("%d %d",&x,&y);
printf("%lld",(long long int)x+y);
return 0;
}*/
/*#include <stdio.h>
int main()
{
long long int x,y;
scanf("%lld %lld",&x,&y);
printf("%lld",x+y);
return 0;
}*/
/*#include <stdio.h>
int main()
{
int n;
scanf("%d",&n);
printf("%d",-n);
return 0;
}
*/
/*#include <stdio.h>
int main()
{
char n;
scanf("%c",&n);
printf("%c",n+1) ;
return 0;
}*/
/*#include <stdio.h>
int main()
{
int x,y;
scanf("%d %d",&x,&y);
printf("%d",x/y);
return 0;
}*/
/*#include <stdio.h>
int main()
{
int x,y;
scanf("%d %d",&x,&y);
printf("%d",x%y);
return 0;
}*/
/*#include <stdio.h>
int main()
{
int n;
scanf("%d",&n);
printf("%lld",(long long int)n+1);
return 0;
}*/
/*#include <stdio.h>
int main()
{
int x,y;
scanf("%d %d",&x,&y);
printf("%lld\n",(long long int)x+y);
printf("%d\n",x-y);
printf("%lld\n",(long long int)x*y);
printf("%d\n",x/y);
printf("%d\n",x%y);
printf("%.2f\n",(float)x/y);
return 0;
}*/
/*#include <stdio.h>
int main()
{
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
printf("%lld\n",(long long int)a+b+c);
printf("%.1f",(float)(a+b+c)/3);
return 0;
}
비교연산자
> < >= <= == !=
1. a<b 1 0
2. <= >= != =을 오른쪽
3.
a==1 (비교연산자) a와 1 이 같니?? 1 or 0
a=1; (대입연산자) a에 1을 대입하세요.
printf("%d",0!=1);
*/
/*#include <stdio.h>
int main()
{
int n;
scanf("%d",&n);
printf("%d",n<<1);
return 0;
}*/
/*#include <stdio.h>
int main()
{
int x,y;
scanf("%d %d",&x,&y);
printf("%d",x<<y);
return 0;
}*/
/*#include <stdio.h>
int main()
{
int a,b;
scanf("%d %d",&a,&b);
printf("%d",a>b);
return 0;
}*/
/*#include <stdio.h>
int main()
{
int a,b;
scanf("%d %d",&a,&b);
printf("%d",a!=b);
return 0;
}
논리연산 1 0
0 거짓
0이 아닌 모든 수 참
printf("%d",!10); //0
not and or
!
!1 0
!0 1
and && 그리고
입력 둘 다 참일때만 결과가 참
0 && 0 0
0 && 1 0
1 && 0 0
1 && 1 1
or || 또는 (vertical bar)
입력 둘 중 하나라도 참이면 참
0 || 0 0
0 || 1 1
1 || 0 1
1 || 1 1
// 비트단위논리연산
int a=10;
int b=2;
a&&b 1 && 1 1
a&b 1010
& 0010
10 2
a||b 1 || 1 1
a|b 1010
| 0010
1010 10
a^b 각 비트가 다르면 1 같으면 0
*/
/*#include <stdio.h>
int main()
{
int n;
scanf("%d",&n);
printf("%d",!n);
return 0;
}*/
/*#include <stdio.h>
int main()
{
int x,y;
scanf("%d %d",&x,&y);
printf("%d",x||y);
return 0;
}*/
/*#include <stdio.h>
int main()
{
int x,y;
scanf("%d %d",&x,&y);
printf("%d",!x&&!y);
return 0;
}*/
/*#include <stdio.h>
int main()
{
int n;
scanf("%d",&n);
printf("%d",~n);
return 0;
}*/
/*#include <stdio.h>
int main()
{
int x,y;
scanf("%d %d",&x,&y);
printf("%d",x^y);
return 0;
}
1132
1133
*/