結果

問題 No.1291 小手調べ
ユーザー semisagisemisagi
提出日時 2020-11-20 21:21:40
言語 Swift
(5.10.0)
結果
WA  
実行時間 -
コード長 812 bytes
コンパイル時間 8,820 ms
コンパイル使用メモリ 129,704 KB
実行使用メモリ 7,964 KB
最終ジャッジ日時 2023-09-30 18:50:17
合計ジャッジ時間 7,798 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,744 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 4 ms
7,708 KB
testcase_04 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

struct Scanner {
    private var elements = [String]()
    private var index = 0

    mutating func peek() -> String {
        while elements.count == index {
            elements = readLine()!.split(separator: " ").map(String.init)
            index = 0
        }
        return elements[index]
    }

    mutating func next() -> String {
        defer { index += 1 }
        return peek()
    }

    mutating func nextInt() -> Int {
        return Int(next())!
    }

    mutating func nextInts(_ n: Int) -> [Int] {
        return (0 ..< n).map { _ in nextInt() }
    }

    mutating func nextDouble() -> Double {
        return Double(next())!
    }
}

var scanner = Scanner()
let N = scanner.nextInt()

for _ in 0 ..< N {
    let d = scanner.nextInt()
    print("9" + String(repeating: "0", count: d - 1))
}
0