본문 바로가기

Programming/BaekJoon

[C++] 백준 2783번 : 삼각 김밥


https://www.acmicpc.net/problem/2783




#include <iostream>

using namespace std;

int main() {

double S_25;

int a, b;

cin >> a >> b;

double min = ((double)a / b);;


int n;

cin >> n;

for (int i = 0; i < n; i++) {

cin >> a >> b;

min = min > ((double)a / b) ? ((double)a / b) : min;

}


cout << min * 1000 << "\n";

}