結果

問題 No.2621 Fee Schedule
ユーザー Yuzu Mashiro
提出日時 2024-06-26 11:00:43
言語 Swift
(6.0.3)
結果
AC  
実行時間 9 ms / 2,000 ms
コード長 791 bytes
コンパイル時間 14,737 ms
コンパイル使用メモリ 129,644 KB
実行使用メモリ 9,344 KB
最終ジャッジ日時 2024-06-26 11:01:46
合計ジャッジ時間 15,561 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

// #region
enum Input {
  static func int() -> Int {
    return Int(readLine()!)!
  }

  static func ints() -> (Int, Int) {
    readLine()!.split(separator: " ").map { Int($0)! }[0, 1]
  }

  static func ints() -> (Int, Int, Int) {
    readLine()!.split(separator: " ").map { Int($0)! }[0, 1, 2]
  }
}

extension Bool {
  func print<T>(yes: T, no: T) {
    Swift.print(self ? yes : no)
  }
}

extension Int {
  func print() {
    Swift.print(self)
  }
}

extension String {
  func print() {
    Swift.print(self)
  }
}

extension Array {
  subscript(a: Int, b: Int) -> (Element, Element) {
    (self[a], self[b])
  }

  subscript(a: Int, b: Int, c: Int) -> (Element, Element, Element) {
    (self[a], self[b], self[c])
  }
}
// #endregion

let (a, b, c) = Input.ints()
min(a * c, b).print()
0