QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#69845#5232. Liczenie punktów [C]mik10 ✓1ms1800kbC++17244b2023-01-02 05:16:442023-01-02 05:16:47

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-01-02 05:16:47]
  • 评测
  • 测评结果:10
  • 用时:1ms
  • 内存:1800kb
  • [2023-01-02 05:16:44]
  • 提交

answer

#include <cstdio>

int main()
{
  int n, r = 0, g = 0;
  scanf("%i ", &n);
  for (int i = 0; i<n; i++)
  {
    if (i%(n/10) == 0) g = 1;
    if (getchar() != 'T') g = 0;
    if ((i+1)%(n/10) == 0) r += g;
  }
  printf("%i\n", r);
  return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 1
Accepted

Test #1:

score: 1
Accepted
time: 1ms
memory: 1584kb

input:

10
TNTNNNNNNN

output:

2

result:

ok single line: '2'

Test #2:

score: 0
Accepted
time: 1ms
memory: 1592kb

input:

10
NTTNNNNNTN

output:

3

result:

ok single line: '3'

Test #3:

score: 0
Accepted
time: 1ms
memory: 1624kb

input:

10
NNNTNTTNNT

output:

4

result:

ok single line: '4'

Test #4:

score: 0
Accepted
time: 1ms
memory: 1688kb

input:

10
TNNNNTNNNN

output:

2

result:

ok single line: '2'

Test #5:

score: 0
Accepted
time: 1ms
memory: 1648kb

input:

10
NNNTNNNTTT

output:

4

result:

ok single line: '4'

Test #6:

score: 0
Accepted
time: 1ms
memory: 1732kb

input:

10
NTNTNTNTNT

output:

5

result:

ok single line: '5'

Subtask #2:

score: 1
Accepted

Test #7:

score: 1
Accepted
time: 1ms
memory: 1584kb

input:

20
TNNNNTTTTNTNNTNTNNTN

output:

1

result:

ok single line: '1'

Test #8:

score: 0
Accepted
time: 1ms
memory: 1596kb

input:

20
TTTTTNNTTNTNNNTTTTTT

output:

5

result:

ok single line: '5'

Test #9:

score: 0
Accepted
time: 1ms
memory: 1684kb

input:

20
TNNTTTNTTTNTNTNNTTNT

output:

3

result:

ok single line: '3'

Test #10:

score: 0
Accepted
time: 1ms
memory: 1736kb

input:

20
TNTTTNTNTNTTTTNTTTNT

output:

4

result:

ok single line: '4'

Test #11:

score: 0
Accepted
time: 1ms
memory: 1680kb

input:

20
TNTTTTTTTNTTTTNTTNTT

output:

6

result:

ok single line: '6'

Test #12:

score: 0
Accepted
time: 1ms
memory: 1796kb

input:

20
NTTNTTNTTNTTNTTNTTNT

output:

3

result:

ok single line: '3'

Subtask #3:

score: 1
Accepted

Test #13:

score: 1
Accepted
time: 1ms
memory: 1688kb

input:

100
NNTNNNTTNNTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTNTTTTTTTTTTTTNTTTTTTNTNNTTTNNTTTTTTTTTTTNTTTTTTTTTTTTNTTTTTT

output:

4

result:

ok single line: '4'

Test #14:

score: 0
Accepted
time: 1ms
memory: 1576kb

input:

50
TNTTTTTTTTTTTNTNTNTTNTTNNTTTTTTTTTTTTTNNTNTTNTTTTT

output:

4

result:

ok single line: '4'

Test #15:

score: 0
Accepted
time: 1ms
memory: 1692kb

input:

40
TTNTNTTTTTTNTTNTTTTTTTTNTTTTTTTTTTTTTTTT

output:

5

result:

ok single line: '5'

Test #16:

score: 0
Accepted
time: 1ms
memory: 1672kb

input:

60
TTTTTTTTTTNTNTTNNNTTNNNNTTTTNTNNNNNTNTNTTNTTTTTTTTTTTTTTTTNT

output:

3

result:

ok single line: '3'

Test #17:

score: 0
Accepted
time: 1ms
memory: 1732kb

input:

40
TTTTNNTNTTTNTTNTTTTTTTNTTTTTNTNTTTTTNNTN

output:

4

result:

ok single line: '4'

Test #18:

score: 0
Accepted
time: 1ms
memory: 1680kb

input:

30
NTTTNTTTNTTTNTTTNTTTNTTTNTTTNT

output:

2

result:

ok single line: '2'

Subtask #4:

score: 1
Accepted

Test #19:

score: 1
Accepted
time: 1ms
memory: 1584kb

input:

10
NTNNTNNNTN

output:

3

result:

ok single line: '3'

Test #20:

score: 0
Accepted
time: 1ms
memory: 1528kb

input:

100
TNTTNNTNNTTTTTTNTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTNTTTTTTTTNTTTNNTNNNTTTTTTNTTT

output:

5

result:

ok single line: '5'

Test #21:

score: 0
Accepted
time: 1ms
memory: 1592kb

input:

40
TTNTTTTTTTTTTTTTNTTTNTTTTNTTTTNNTTTTTTNT

output:

4

result:

ok single line: '4'

Test #22:

score: 0
Accepted
time: 1ms
memory: 1644kb

input:

80
TNNNTTTNTTNNNNNTNTNNTTTTNNTTTNTTTTNTTTTTTTNTTTTTTNTTTTNNTTTTTTTTTTTTTTTTTNTNNTNT

output:

2

result:

ok single line: '2'

Test #23:

score: 0
Accepted
time: 1ms
memory: 1680kb

input:

80
NTNTTNNNTTTTTTTTNTTNTTNTTTTTTTTTTTTTTTTTTTTNNNTNTTTTTTTTNNNNTTTNTTNTTTTTNNNTTNNN

output:

4

result:

ok single line: '4'

Test #24:

score: 0
Accepted
time: 1ms
memory: 1644kb

input:

40
NTTTTNTTTTNTTTTNTTTTNTTTTNTTTTNTTTTNTTTT

output:

2

result:

ok single line: '2'

Subtask #5:

score: 1
Accepted

Test #25:

score: 1
Accepted
time: 0ms
memory: 1684kb

input:

90
NTTTTNTNNTTTTNTTTTTTTTTTTTTTTTTTTTTNTTTTTTTTTTTTNNTTTNTTTTTTTTTTTNTTTTTTTTTTTTTTTTTTNTTTTT

output:

4

result:

ok single line: '4'

Test #26:

score: 0
Accepted
time: 0ms
memory: 1692kb

input:

40
TTTTTTTTTTTNTTTTNTNNNNTTTTTNTTTNTTTTTTNT

output:

4

result:

ok single line: '4'

Test #27:

score: 0
Accepted
time: 1ms
memory: 1556kb

input:

10
NTTNNNNTTN

output:

4

result:

ok single line: '4'

Test #28:

score: 0
Accepted
time: 1ms
memory: 1640kb

input:

40
TTTTTNTTTTTTTTTNTTTTTNTTTTNTTTTTTTTNTTTT

output:

5

result:

ok single line: '5'

Test #29:

score: 0
Accepted
time: 1ms
memory: 1552kb

input:

80
TTNNNNTTTTNTNNNTTTTTTTTTTTTTTTTTTTTTTTTTNTTTTNTNNNTNTNTTTTTNTTTTTNTTTTTTTTTTTTTT

output:

4

result:

ok single line: '4'

Test #30:

score: 0
Accepted
time: 0ms
memory: 1684kb

input:

90
TTTTTTTTTNTTTTTTTTTTTTTTTTTTTTTTTTTNTTTTTTTTTNTTTTTTTTTTTTTTTTTTTTTTTTTNTTTTTTTTTNTTTTTTTT

output:

5

result:

ok single line: '5'

Test #31:

score: 0
Accepted
time: 1ms
memory: 1660kb

input:

50
NTTTTTNTTTTTNTTTTTNTTTTTNTTTTTNTTTTTNTTTTTNTTTTTNT

output:

1

result:

ok single line: '1'

Subtask #6:

score: 1
Accepted

Test #32:

score: 1
Accepted
time: 1ms
memory: 1644kb

input:

70
NTNNTNTTTTTTTTTTTTTTTNTNNNNNNTNNNTTTTTTTTTTTTTTTTTTTNTTTTTTTTTNTTTTTTT

output:

5

result:

ok single line: '5'

Test #33:

score: 0
Accepted
time: 1ms
memory: 1640kb

input:

50
TNTTNTNNNNTTNTTTTTTTNTTTTNNTNNTTTTTTTTTTNTTNTNNNTT

output:

3

result:

ok single line: '3'

Test #34:

score: 0
Accepted
time: 1ms
memory: 1660kb

input:

90
TTTTTNTNTTTTTTTTTTTTTTTTTTTTTTTTTTTNNNNNTTTTTTTTTTTTTTTTTNTTTNTTTTTTTTTTNTTTTTTTTTTTNTTTTT

output:

4

result:

ok single line: '4'

Test #35:

score: 0
Accepted
time: 1ms
memory: 1660kb

input:

10
NNNNNNTTNT

output:

3

result:

ok single line: '3'

Test #36:

score: 0
Accepted
time: 1ms
memory: 1680kb

input:

50
TTTTTTTTTTTTTTNTTTTTTNTTTNNNNNTNTNNTTTTTTTTTTTTTTT

output:

6

result:

ok single line: '6'

Test #37:

score: 0
Accepted
time: 1ms
memory: 1684kb

input:

100
TTTTTTTTTTNTTTTTTTTTTTTTTTTTTTTTTTTTTTTNTTTTTTTTTTNTTTTTTTTTTTTTTTTTTTTTTTTTTTTNTTTTTTTTTTNTTTTTTTTT

output:

5

result:

ok single line: '5'

Test #38:

score: 0
Accepted
time: 1ms
memory: 1580kb

input:

60
NTTTTTTNTTTTTTNTTTTTTNTTTTTTNTTTTTTNTTTTTTNTTTTTTNTTTTTTNTTT

output:

1

result:

ok single line: '1'

Subtask #7:

score: 1
Accepted

Test #39:

score: 1
Accepted
time: 1ms
memory: 1684kb

input:

30
TNTNNTTTTTTTTNTTTNTTTTNTTTNTNT

output:

3

result:

ok single line: '3'

Test #40:

score: 0
Accepted
time: 1ms
memory: 1588kb

input:

40
TTTTTTTTNTTNTTTTTTNTTTTTNNTNTTTNTTTTTTTN

output:

5

result:

ok single line: '5'

Test #41:

score: 0
Accepted
time: 1ms
memory: 1496kb

input:

60
NNTNTNTNNTNTNTNNTTNTNTTNTTTTTNTNTTTTTTTTTTTTNTTTTTTTTTTTTTTT

output:

3

result:

ok single line: '3'

Test #42:

score: 0
Accepted
time: 1ms
memory: 1596kb

input:

50
TTTTTNNNTTTTTTNNNTTTTTNTTTTTNTTTTTTTTTNTTTTTTTTTNT

output:

3

result:

ok single line: '3'

Test #43:

score: 0
Accepted
time: 1ms
memory: 1684kb

input:

70
TTTTTTNTTTTNTTNTTTTTTTTTTTTNTTTTTTTTNNTTTNTTNTTTTNTTTNNNTTNTTTNTTTTTTT

output:

2

result:

ok single line: '2'

Test #44:

score: 0
Accepted
time: 1ms
memory: 1800kb

input:

90
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT

output:

10

result:

ok single line: '10'

Test #45:

score: 0
Accepted
time: 1ms
memory: 1732kb

input:

70
NTTTTTTTNTTTTTTTNTTTTTTTNTTTTTTTNTTTTTTTNTTTTTTTNTTTTTTTNTTTTTTTNTTTTT

output:

1

result:

ok single line: '1'

Subtask #8:

score: 1
Accepted

Test #46:

score: 1
Accepted
time: 1ms
memory: 1736kb

input:

40
NNNTTNNTTTTTTTTTNTTNTNNNNNNTNTNTTTTTTTTT

output:

4

result:

ok single line: '4'

Test #47:

score: 0
Accepted
time: 1ms
memory: 1660kb

input:

80
TTTTTTTTNNTTNNTTNTNTTNNNNNNTNTNNTTTTNTTTTTTTTTTTNTNNTTTNTTTTTTTTNNNNTNNNTTTTTTNT

output:

3

result:

ok single line: '3'

Test #48:

score: 0
Accepted
time: 1ms
memory: 1552kb

input:

20
TTTTNNTTNTTNTNTTTTNT

output:

5

result:

ok single line: '5'

Test #49:

score: 0
Accepted
time: 1ms
memory: 1684kb

input:

90
TTTTTTTTTTTNTTTTTTTTTTTTTTTTTTTTTTTNNNTNNTTTTTTNNNTTNNTTTTTTTTTTTTTTTTTTTTTTNTTTTNTTTTTTTT

output:

4

result:

ok single line: '4'

Test #50:

score: 0
Accepted
time: 1ms
memory: 1732kb

input:

10
TNTNNTNNNT

output:

4

result:

ok single line: '4'

Test #51:

score: 0
Accepted
time: 1ms
memory: 1732kb

input:

100
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT

output:

10

result:

ok single line: '10'

Test #52:

score: 0
Accepted
time: 1ms
memory: 1664kb

input:

80
NTTTTTTTTNTTTTTTTTNTTTTTTTTNTTTTTTTTNTTTTTTTTNTTTTTTTTNTTTTTTTTNTTTTTTTTNTTTTTTT

output:

1

result:

ok single line: '1'

Subtask #9:

score: 1
Accepted

Test #53:

score: 1
Accepted
time: 1ms
memory: 1796kb

input:

80
TNNNNNNNTTTTNTTTTNTNTTNTTTTTTTTTTNTTNNTTTNNNNTNNTNNNTTTTTTTTTTTNTTTTTTTTTTTTTTTT

output:

3

result:

ok single line: '3'

Test #54:

score: 0
Accepted
time: 0ms
memory: 1692kb

input:

40
TTNTNNTTTTTTTNTTNTNTTTTTNTTTNTTNTTTTNNTT

output:

3

result:

ok single line: '3'

Test #55:

score: 0
Accepted
time: 1ms
memory: 1660kb

input:

50
TTTTNTTTTTNNTNNNTTTTTTNTTTTTNTTNTTNNTTTNTNTTTTTTTT

output:

2

result:

ok single line: '2'

Test #56:

score: 0
Accepted
time: 1ms
memory: 1684kb

input:

50
NTTTTTTTTTTNNNNNTTTTNNTTNNTTTTTTTTTTTTTTTTTTTTTTTT

output:

5

result:

ok single line: '5'

Test #57:

score: 0
Accepted
time: 0ms
memory: 1680kb

input:

60
TTTTTTNNTTNNNTTTTNNNNTNNNNTNNNTTNNNNNNTNNTTTTTTTTTTTTTTNTTTT

output:

3

result:

ok single line: '3'

Test #58:

score: 0
Accepted
time: 1ms
memory: 1512kb

input:

90
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN

output:

0

result:

ok single line: '0'

Test #59:

score: 0
Accepted
time: 1ms
memory: 1660kb

input:

90
NTTTTTTTTTNTTTTTTTTTNTTTTTTTTTNTTTTTTTTTNTTTTTTTTTNTTTTTTTTTNTTTTTTTTTNTTTTTTTTTNTTTTTTTTT

output:

1

result:

ok single line: '1'

Subtask #10:

score: 1
Accepted

Test #60:

score: 1
Accepted
time: 1ms
memory: 1688kb

input:

100
NTTTNNTTTTNNNTNNNNNTTTTTTTTTTTNTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTNTTTTTTNTTTTNTTTTTNNN

output:

4

result:

ok single line: '4'

Test #61:

score: 0
Accepted
time: 1ms
memory: 1800kb

input:

90
TTNNNNNNNTTTTTTTTTNTTTTTTTTTNTTNNNNTTNTTNNTNNTTTTTTTTNTTTNTTTTTNNNNNNNNTTTTTTTTTTTTNTTTTNT

output:

2

result:

ok single line: '2'

Test #62:

score: 0
Accepted
time: 1ms
memory: 1688kb

input:

90
TTTTNTTTNTTTTTTTTTTNTTTTTTTTTNTTTTTTTTTTNNTNNTTNNNNTNNTNTTNNNTTTTTTTTTTTTTTTTTTTTTTTTTTTTT

output:

4

result:

ok single line: '4'

Test #63:

score: 0
Accepted
time: 1ms
memory: 1732kb

input:

60
TTTTTTTTTTTTTNTTTTTTTTTNTTTTTTTTTTTTTTTTNTTTTNTTTNTTTTTTTTTT

output:

5

result:

ok single line: '5'

Test #64:

score: 0
Accepted
time: 1ms
memory: 1732kb

input:

70
TTNTNNTTTNTTNTTTTTTTTTTTTTTTTTNNNNTTTTTTTTTTTTTTTNTTTTTTTTTTTTTTTTTTTN

output:

5

result:

ok single line: '5'

Test #65:

score: 0
Accepted
time: 1ms
memory: 1596kb

input:

100
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN

output:

0

result:

ok single line: '0'

Test #66:

score: 0
Accepted
time: 1ms
memory: 1680kb

input:

100
NTTTTTTTTTTNTTTTTTTTTTNTTTTTTTTTTNTTTTTTTTTTNTTTTTTTTTTNTTTTTTTTTTNTTTTTTTTTTNTTTTTTTTTTNTTTTTTTTTTN

output:

0

result:

ok single line: '0'

Extra Test:

score: 0
Extra Test Passed