小F的永久代币卡回本计划 | 豆包MarsCode AI刷题

41 阅读1分钟
#include <iostream>
using namespace std;

int solution(int a, int b) { return (a / b) + (a % b != 0); }

int main() {
  cout << (solution(10, 1) == 10) << endl;
  cout << (solution(10, 2) == 5) << endl;
  cout << (solution(10, 3) == 4) << endl;
  return 0;
}