Shawn's Blog

  • Home
  • Tags
  • Categories
  • Archives
  • Search
  • Table of Contents
  • Overview

Shawn

若有恒,何必三更眠五更起;最无益,莫过一日曝十日寒。
392 posts
13 categories
114 tags

AcWing 3655. 楼层

Posted on 2021-06-10 Edited on 2024-11-24 In AcWing
1
2
3
4
5
6
7
8
9
10
11
#include <iostream>
using namespace std;
int main() {
int T, n, x;
cin >> T;
while (T--) {
cin >> n >> x;
cout << (n <= 2 ? 1 : (n - 3 + x) / x + 1) << endl;
}
return 0;
}
# 模拟
AcWing 3663. 打印数字菱形
AcWing 3646. 分水果
© 2024 Shawn
Powered by Hexo & NexT.Mist
0%