#include<cstdio>
#include<cstring>
#include<cstdlib>
int main(){
int N;
int digit=0;
int digit_sum=0;
scanf("%d", &N);
//뒤집기
//자릿수 구하기
//자릿수 합구하기
int reverseN=0;
while(N>0) {
reverseN = reverseN * 10 + N % 10;
digit_sum+=N%10;
digit++;
N/=10;
}
printf("%d\n", reverseN);
printf("%d\n", digit_sum);
}
4041
#include <stdio.h>
int main() {
int n;
int ans5, ans4, ans3;
scanf("%d", &n);
if(n%5!=0){
printf("-1");
return 0;
}else{
ans5 = n / 300;
n %= 300;
ans4 = n / 60;
n %= 60;
ans3 = n / 10;
n %= 10;
printf("%d %d %d", ans5, ans4, ans3);
return 0;}
}
4816
list1 = []
sum1 = 0
sum1 = int(sum1)
for i in range(7):
num = int(input())
if num % 2 == 1:
list1.append(num)
sum1+=num
list1.sort()
if sum1==0:
print(-1)
else:
print(sum1)
print(list1[0])
4561
a, b = input().split()
a = float(a)
b = float(b)
print(format(a/b, ".3f"))
a, b = input().split()
a = int(a)
b = int(b)
print(a*(2**b))
함수
a, b = input().split()
a = int(a)
b = int(b)
if a>b :
print(b, a)
else:
print(a, b)
a = float(input())
print(format(a*a*3.14, ".2f"))
a, b = input().split()
a = int(a)
b = int(b)
if a<b :
print(a)
else:
print(b)
a, b = input().split()
a = int(a)
b = int(b)
if a<b :
print(b)
else:
print(a)
n = int(input())
if n > 0 :
print(n)
else :
print(n * - 1)
print('Hello?')
a, b = input().split()
a = int(a)
b = int(b)
print(a**b)
a, b = input().split()
a = int(a)
b = int(b)
if a<b :
print(a)
else:
print(b)
import math
a = float(input())
print(math.floor(a))
import math
a = float(input())
print(math.ceil(a))
a, b = input().split()
a = int(a)
b = int(b)
if a<b :
print(b-a)
else:
print(a-b)
a, b = input().split()
a = int(a)
b = int(b)
if a<b :
print(b)
else:
print(a)