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.|

RGB7004 - Куб

Өгөгдсөн кубын эзэлхүүн ба гүйцэд гадаргуугийн талбайг ол.

Input

Кубын тал бүхэл тоон утгатайгаар нэг мөрөнд өгөгдөнө.

Output

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

Example

Input:
5

Output:
125 150

Нэмсэн:Bataa
Огноо:2011-01-16
Хугацааны хязгаарлалт: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
2023-11-22 07:17:31
mdkue

2023-11-20 06:18:37
#include <iostream>
using namespace std;

int main() {

int a;
cin >> a;
cout << a * a * a << " " << a * a * 6;

return 0;
}
2023-11-16 10:23:35
#include<iostream>
using namespace std;
int main(){
int n,t,a,b,c,d,k;
cin>>a>>b;
k=a-b;
d=b-a;
if (a>b){
cout<<b<<" "<<k/2;
}
else{
cout<<a<<" "<<d/2;
}
}
2023-11-16 10:20:23
#include<iostream>
using namespace std;
int main(){
int n,t,a,b,c,d,k=0;
cin>>n;
a=n/100;
b=n/10%10;
c=n%10;
t=1;
if (a>0 && n%a>0){
t=0;
}
if (b>0 && n%b>0){
t=0;
}
if (c>0 && n%c>0){
t=0;
}
cout<<t;
}
2023-11-16 10:12:52
#include<iostream>
using namespace std;
int main(){
int k,n,w,a=0,i,b;
cin>>k>>n>>w;
for(i=1;i<=w;i++){
a=a+i;
}
b=a*k;
if(b<=n){
cout<<0;
}
else{
cout<<b-n;
}
}
2023-11-16 10:11:52
#include<iostream>
using namespace std;
int main(){
int a,b,c,d;
cin>>a;
d=a%10;
c=a%100/10;
if (a>-10) cout<<a;
else if (d>c) cout<<a/10-c+d;
else cout<<a/10;
}
2023-11-16 10:08:41
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int a,b,c,k,h,g,i,s;
s=-111111;
cin>>a>>b>>c;
if(s<a+b+c)
s=a+b+c;
if(s<a+b*c)
s=a+b*c;
if(s<a*b+c)
s=a*b+c;
if(s<a*b*c)
s=a*b*c;
if(s<(a+b)*c)
s=(a+b)*c;
if(s<a*(b+c))
s=a*(b+c);
cout<<s;
return 0;
}
2023-11-16 10:06:00
89
#include<cmath>
#include<iostream>
using namespace std;
int main(){
double a,b,c,d;
cin>>a;
cout<<round(a);
}
2023-11-16 10:03:25
#include<iostream>
using namespace std;
int main(){
int a,b,c,d;
cin>>a;
d=a%10;
c=a%100/10;
if (a>-10) cout<<a;
else if (d>c) cout<<a/10-c+d;
else cout<<a/10;
}
2023-11-16 10:01:04
kavadrat tegshtgel
#include <iostream>
using namespace std;

int main() {
long long a,b,c,d;
cin>>a>>b>>c;
d=(b*b)-(4*a*c);
if(d==0){
cout<<"1";
}
if(d>0){
cout<<"2";
}
if(d<0){
cout<<"0";
}
}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.