10-18

#include <iostream>

using namespace std;

int main()

{

int n, k;

cin >> n >> k;

int brojVoznji = (n + k – 1) / k;

cout << brojVoznji << endl;

return 0;

}

 

2.nacin

#include <iostream>

using namespace std;

int main()
{
int n, k,brojVoznji;
cin >> n >> k;
if(n%k==0)
brojVoznji = (n / k);
else
brojVoznji =(n / k + 1);
cout << brojVoznji << endl;
return 0;
}

Advertisements