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-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";
}
}
2023-11-06 13:30:39
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
We've known each other for so long
Your heart's been aching but you're too shy to say it
Inside we both know what's been going on
We know the game and we're gonna play it
And if you ask me how I'm feeling
Don't tell me you're too blind to see
2023-11-03 19:40:02
end mgl hun beeenuuu
2023-10-30 07:07:33
#include<stdio.h>
#include<math.h>
int a,v,p;
main(){
scanf("%d",&a);
p=a*a*6;
v=a*a*a;
printf("%d %d",v,p);
}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.