質問編集履歴
3
書式の変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
AtcoderのAGC39のA問題
|
2
|
-
https://atcoder.jp/contests/agc039/tasks/agc039_a
|
1
|
+
[AtcoderのAGC39のA問題](https://atcoder.jp/contests/agc039/tasks/agc039_a)
|
3
2
|
で人から送られてきた答えなのですが、
|
4
3
|
```Python
|
5
4
|
S = [i for i in input()]
|
2
URLの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
+
AtcoderのAGC39のA問題
|
2
|
+
https://atcoder.jp/contests/agc039/tasks/agc039_a
|
1
|
-
|
3
|
+
で人から送られてきた答えなのですが、
|
2
4
|
```Python
|
3
5
|
S = [i for i in input()]
|
4
6
|
K = int(input())
|
1
書式の変更
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
|
1
|
+
sAtcoder AGC39のA問題について
|
body
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
AtcoderのAGC39のA問題で人から送られてきた答えなのですが、
|
2
|
+
```Python
|
2
3
|
S = [i for i in input()]
|
3
4
|
K = int(input())
|
4
5
|
ans = 0
|
@@ -14,6 +15,8 @@
|
|
14
15
|
if len(kazu) == 1 and len(S) % 2 != 0:
|
15
16
|
ans = len(S) * (K//2) + (K%2==1) * (len(S)//2)
|
16
17
|
print(ans)
|
18
|
+
```
|
19
|
+
|
17
20
|
このような回答だったのですふぁ、下の
|
18
21
|
if len(kazu) == 1 and len(S) % 2 != 0:
|
19
22
|
内のansを導く式の意味が理解できません。どうしてこのような式で求まるのでしょうか
|