-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathabc345_b.py
More file actions
51 lines (50 loc) · 1.03 KB
/
abc345_b.py
File metadata and controls
51 lines (50 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//abc345_b.py
####################################
####################################
####################################
####################################
####################################
####################################
X = int(input())
# di: 商
# mo: 余り
di, mo = divmod(X, 10)
# 余りがある時
if(mo != 0):
print(di+1)
# 余りが無い時
else:
print(di)
####################################
X=int(input())
print((X+9)//10)
####################################
import math
X = int(input())
if X%10 == 0:
print(X//10)
else:
print(X//10+1)
####################################
#my best but 1 WA
import math
x=str(input())
if x[0]=='-':
y=x[1:]
if len(y)>=2:
z0=y[0:-2]
z1=y[-2:]
ans='-'+z0+str(math.floor(int(z1)/10))
elif len(y)==1:
ans='0'
else:
y=x
if len(y)>=2:
z0=y[0:-2]
z1=y[-2:]
ans=z0+str(math.ceil(int(z1)/10))
elif len(y)==1:
z=y[-1]
ans=str(math.ceil(int(z)/10))
print(ans)
####################################