結果

問題 No.2038 Strange Arrange
ユーザー tamato
提出日時 2022-08-12 21:59:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 38 ms / 2,000 ms
コード長 417 bytes
コンパイル時間 146 ms
コンパイル使用メモリ 82,228 KB
実行使用メモリ 52,836 KB
最終ジャッジ日時 2024-09-24 18:16:01
合計ジャッジ時間 814 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353


def main():
    import sys
    input = sys.stdin.readline

    A = []
    k = 1
    i = 1
    limit = 2
    while k < 10:
        if i & 1:
            A.append(1)
        else:
            if i == limit:
                k += 1
                limit = i * 2 + 2
            A.append(k)
        i += 1

    N = int(input())
    print("".join(map(str, A[:N])))


if __name__ == '__main__':
    main()
0