Submission #51385551
Source Code Expand
import sys
import os
from io import StringIO
import unittest
def resolve():
N = int(input())
ans = ""
for _ in range(N):
ans += "10"
print(ans + "1")
class TestClass(unittest.TestCase):
def test_sample1(self):
input = """4"""
expected = """101010101"""
self.assertIO(input, expected)
def test_sample2(self):
input = """1"""
expected = """101"""
self.assertIO(input, expected)
def test_sample3(self):
input = """10"""
expected = """101010101010101010101"""
self.assertIO(input, expected)
def assertIO(self, input, expected):
stdout, stdin = sys.stdout, sys.stdin
sys.stdout, sys.stdin = StringIO(), StringIO(input)
resolve()
sys.stdout.seek(0)
actual = sys.stdout.read()[:-1]
sys.stdout, sys.stdin = stdout, stdin
self.assertEqual(expected, actual)
if __name__ == "__main__":
if "ATCODER" in os.environ:
resolve()
else:
unittest.main(verbosity=2)
Submission Info
| Submission Time | |
|---|---|
| Task | A - Print 341 |
| User | YujiSoftware |
| Language | Python (Cython 0.29.34) |
| Score | 100 |
| Code Size | 1086 Byte |
| Status | AC |
| Exec Time | 277 ms |
| Memory | 12980 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example0.txt, example1.txt, example2.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, example0.txt, example1.txt, example2.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 277 ms | 12940 KiB |
| 001.txt | AC | 35 ms | 12884 KiB |
| 002.txt | AC | 35 ms | 12920 KiB |
| 003.txt | AC | 34 ms | 12908 KiB |
| 004.txt | AC | 34 ms | 12948 KiB |
| 005.txt | AC | 35 ms | 12816 KiB |
| 006.txt | AC | 34 ms | 12940 KiB |
| 007.txt | AC | 33 ms | 12804 KiB |
| 008.txt | AC | 34 ms | 12876 KiB |
| example0.txt | AC | 34 ms | 12980 KiB |
| example1.txt | AC | 33 ms | 12880 KiB |
| example2.txt | AC | 34 ms | 12752 KiB |