質問編集履歴
5
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
https://[``` atcoder.jp/contests/abc139/tasks/abc139_b ```
|
2
2
|
コード
|
3
|
+
```
|
3
|
-
|
4
|
+
a,b=map(int,input().split())
|
4
5
|
c=(b-1)/(a-1)
|
5
6
|
if c-int(c)==0:
|
6
7
|
print(c)
|
4
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
https://[```
|
1
|
+
https://[``` atcoder.jp/contests/abc139/tasks/abc139_b ```
|
2
2
|
コード
|
3
3
|
```a,b=map(int,input().split())
|
4
4
|
c=(b-1)/(a-1)
|
3
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
https://[``` ```
|
1
|
+
https://[``` ```atcoder.jp/contests/abc139/tasks/abc139_b
|
2
2
|
コード
|
3
3
|
```a,b=map(int,input().split())
|
4
4
|
c=(b-1)/(a-1)
|
@@ -6,16 +6,8 @@
|
|
6
6
|
print(c)
|
7
7
|
|
8
8
|
else:
|
9
|
-
print(int(c+1)
|
9
|
+
print(int(c)+1)
|
10
10
|
```]
|
11
11
|
Atcoder の上の問題で以下のコードを提出したところwaになってしまいます。
|
12
12
|
自分で見直す限りではwaの原因がわからないので、なぜそうなるのかお教え頂きたいです。足りない穴の数はb-1個、1個のaにつき増えるのはa-1口
|
13
|
-
したがって必要なのはb-1/a-1 or b-1/a-1 +1という思考をしました
|
13
|
+
したがって必要なのはb-1/a-1 or b-1/a-1 +1という思考をしました
|
14
|
-
|
15
|
-
a,b=map(int,input().split())
|
16
|
-
c=(b-1)/(a-1)
|
17
|
-
if c-int(c)==0:
|
18
|
-
print(c)
|
19
|
-
|
20
|
-
else:
|
21
|
-
print(int(c)+1)
|
2
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
https://[``` ```
|
1
|
+
https://[``` ```____ atcoder.jp/contests/abc139/tasks/abc139_b
|
2
2
|
コード
|
3
3
|
```a,b=map(int,input().split())
|
4
4
|
c=(b-1)/(a-1)
|
@@ -6,9 +6,8 @@
|
|
6
6
|
print(c)
|
7
7
|
|
8
8
|
else:
|
9
|
-
print(int(c
|
9
|
+
print(int(c+1))
|
10
|
-
atcoder.jp/contests/abc139/tasks/abc139_b
|
11
|
-
```]
|
10
|
+
```]
|
12
11
|
Atcoder の上の問題で以下のコードを提出したところwaになってしまいます。
|
13
12
|
自分で見直す限りではwaの原因がわからないので、なぜそうなるのかお教え頂きたいです。足りない穴の数はb-1個、1個のaにつき増えるのはa-1口
|
14
13
|
したがって必要なのはb-1/a-1 or b-1/a-1 +1という思考をしました
|
1
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,4 +1,14 @@
|
|
1
|
+
https://[``` ```python
|
2
|
+
コード
|
3
|
+
```a,b=map(int,input().split())
|
4
|
+
c=(b-1)/(a-1)
|
5
|
+
if c-int(c)==0:
|
6
|
+
print(c)
|
7
|
+
|
8
|
+
else:
|
9
|
+
print(int(c)+
|
10
|
+
atcoder.jp/contests/abc139/tasks/abc139_b
|
1
|
-
|
11
|
+
```](http://atcoder.jp/contests/abc139/tasks/abc139_b)
|
2
12
|
Atcoder の上の問題で以下のコードを提出したところwaになってしまいます。
|
3
13
|
自分で見直す限りではwaの原因がわからないので、なぜそうなるのかお教え頂きたいです。足りない穴の数はb-1個、1個のaにつき増えるのはa-1口
|
4
14
|
したがって必要なのはb-1/a-1 or b-1/a-1 +1という思考をしました
|