結果

問題 No.46 はじめのn歩
ユーザー not_522not_522
提出日時 2015-07-14 19:45:14
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 524 bytes
コンパイル時間 1,233 ms
コンパイル使用メモリ 157,552 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-08 07:16:10
合計ジャッジ時間 1,526 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

template<typename T> inline T gcd(T a, T b) {
  return __gcd(a, b);
}

template<typename T> inline T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}

template<typename T> inline T floor(T a, T b) {
  return a / b * b <= a ? a / b : a / b - 1;
}

template<typename T> inline T ceil(T a, T b) {
  return floor(a + b - 1, b);
}

template<typename T> inline T round(T a, T b) {
  return floor(a + b / 2);
}

int main() {
  int a, b;
  cin >> a >> b;
  cout << ceil(b, a) << endl;
}
0