Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

RGB7171 - Орц, давхар, хаалга

Байшингийн давхар, орц, нэг давхарт суудаг айлын тоо мэдэгдэж байвал энэхүү байшингийн өгөгдсөн тоот нь хэддүгээр орцны, хэдэн давхрын хэд дэх хаалга вэ?

Жич: Давхар бүр дэх хаалганы тоо ижил.

Input

Эхний мөрөнд байшингийн давхар, орц, нэг давхарт байгаа хаалганы тоонууд нэг зайгаар тусгаарлагдан өгөгдөнө.

Хоёр дахь мөрөнд нэгэн айлын хаалганы дугаар өгөгдөнө.

Output

Орц, давхар, давхрын хэд дэх хаалганы дугаарууд нэг мөрөнд нэг зайгаар тусгаарлагдан хэвлэгдэнэ.

Example

Input:
5 3 4
32

Output:
2 3 4

Нэмсэн:Bataa
Огноо:2013-01-06
Хугацааны хязгаарлалт:1s
Эх кодын хэмжээний хязгаарлалт:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Програмчлалын хэлүүд:ADA95 ASM32 BASH BF C NCSHARP CSHARP C++ 4.3.2 CPP C99 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JAVA JS-RHINO JULIA LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON PYPY3 PYTHON3 RUBY SCALA SCM guile ST TCL WHITESPACE

hide comments
2021-10-04 13:51:47
#include <iostream>
using namespace std;

int main() {
int a, b, c, d, x, y, z;
cin >> b >> a >> c >> d;
x=(d-1)/(b*c)+1;
y=(d-1)/c%b+1;
z=(d-1)%c+1;
cout << x << " " << y << " " << z;
}
//if else hereggu
2021-09-20 03:42:51
hi
2021-08-05 13:36:48
shit ni yu ym be
2021-07-05 08:23:54
#include <stdio.h>
#include <math.h>

main()
{
float dawhar, orts, ail, toot,O,T,D,shit,dd;
scanf("%f%f%f",&dawhar, &orts, &ail);
scanf("%f",&toot);
O = ceil(toot/(dawhar*ail));
shit = (O-1)*dawhar*ail;
D = ceil((toot - shit) / ail);
dd = D*ail - (toot - shit);
T = ail - dd;
printf("%.0f %.0f %.0f",O, D, T);


}
ez22
2021-01-05 12:36:57
az2 enig bodoj chadku bvl shivshig
2020-12-08 11:25:01
easy peasy
#include <iostream>
using namespace std;

int main(){
int floor, group ,doors, all, numbers, target_number;
int find_group, find_floor, find_door;

cin >> floor >> group >> doors;
cin >> numbers;

all = floor * group * doors;

if( numbers % (floor * doors) == 0) find_group = numbers / (floor * doors);
else find_group = numbers / (floor * doors) + 1;


target_number = numbers % (floor * doors);

if(target_number % doors == 0) find_floor = target_number / doors;
else find_floor = target_number / doors + 1;
if(target_number == 0) find_floor = floor;

if(numbers % doors == 0) find_door = doors;
else find_door = numbers % doors;

cout << find_group << " " << find_floor << " " << find_door << endl;
}
2020-10-30 02:26:40
#include <iostream>
using namespace std;
main() {
int a , b , c, n;
scanf("%d%d%d%d" , &a , &b , &c , &n);
int x = n % (a * c);
if (x == 0){
printf("%d %d %d" , n / (a * c) , a , c);
}
else{
printf(" %d " , n / ( a * c) + 1 );
if (x % c == 0){
printf(" %d %d" , x / c , c);
}
else{
printf("%d %d" , x / c + 1 ,x % c );

}
}
}
2020-10-26 13:12:20
#include <iostream>
using namespace std;

main()
{
int davhar, haalga, too,i ,j,k,tooluur = 0,orts;
cin>>davhar>>orts>>haalga>>too;
int baishin[davhar][orts][haalga];
for(k = 1; k <= orts; k++)
for(i = 1; i <= davhar; i++)
for(j = 1; j <= haalga; j++)
{
tooluur ++;
baishin[k][i][j] = tooluur;
if(baishin[k][i][j] == too)
cout<<k<<" "<<i<<" "<<j;
}
}
2020-09-22 15:32:46
enig harj bvl arial looser u

2020-07-16 09:34:25
import java.util.Scanner;

class Main {
public static void main(String[] args) throws java.lang.Exception {
Scanner sc = new Scanner(System.in);

int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int d = sc.nextInt();
int m = d / (a * c);
if (d % (a * c) == 0) {
System.out.print(m + " " + a + " " + c + " ");
} else {
System.out.print((m + 1) + " ");
d = d - (a * c * m);
m = d / c;
if (d % c == 0) {
System.out.println(m + " " + c);
} else {
System.out.println((m + 1) + " " + (d - m * c));
}
}

}

}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.