Submission

Status:
----------

Score: 0

User: mister_o_hater_no1

Problemset: เดินทางไกล

Language: cpp

Time: 0.002 second

Submitted On: 2025-03-15 15:59:04

#include <bits/stdc++.h>
using namespace std;

int main(){
	int n, mx, mnd, mxd, h;
	cin>> n>> mx;
	mxd= mx;
	mnd= mx;
	for(int i= 0; i< n; ++i){
		cin>> h;
		if(h% 12== 0){
			mnd-= 2*5*(h/3);
			mxd-= 2*5*(h/4);
		}
		else if(h% 3== 0){
			mxd-= 2*5*(h/3);
			mnd-= 2*5*(h/3);
		}
		else if(h% 4== 0){
			mxd-= 2*5*(h/4);
			mnd-= 2*5*(h/4);
		}
		cout<< mnd<< " "<< mxd;
		cout<< endl;
	}
	
	
	return 0;
}