백준 8958 OX퀴즈
Console Programming/C# Console 2019. 10. 11. 13:02
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
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TestAnyThing
{
class Program
{
static void Main(string[] args)
{
int testcaseNum = int.Parse(Console.ReadLine());
for (int j = 0; j < testcaseNum; j++)
{
string input = Console.ReadLine();
int score = 0;
int continuity = 0;
{
if (input[i] == 'O')
{
score = score + ++continuity;
}
else
{
continuity = 0;
}
}
Console.WriteLine(score);
}
}
}
}
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
|
|
![](https://blog.kakaocdn.net/dn/YZV1M/btqyWWx1QCm/5XAvgeZPxWNk1eN8RJejY1/img.png)
'Console Programming > C# Console' 카테고리의 다른 글
2019-10-14 UIPanel 과 Data 클래스 만들기 (0) | 2019.10.14 |
---|---|
15일차 배열과 컬렉션을 사용해 인벤토리 만들기 (0) | 2019.10.11 |
백준 2920 음계 (0) | 2019.10.10 |
14일차 배열, 인벤토리에 아이템배열을 넣고, 인벤토리에 메서드 구현하기 (0) | 2019.10.10 |
14일차 배열의 선언 및 초기화. cost와 name 멤버변수를 가진 클래스 product (0) | 2019.10.10 |