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

RGB7002 - Гурвалжин

Өгөгдсөн гурвалжны периметрийг ол.

Input

Гурвалжны талууд бүхэл тоогоор нэг мөрөнд зайгаар тусгаарлагдан өгөгдөнө.

Output

Гурвалжны периметр.

Example

Input:
3 4 5

Output:
12


Нэмсэн:Bataa
Огноо:2011-01-15
Хугацааны хязгаарлалт: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-23 12:34:58
#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-23 12:34:33
#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-23 12:33:41
#include<iostream>
using namespace std; int main(){
int a,b,n,c,d;
cin>>n>>a>>b;
if (b<0) { b=b*(-1); b=n-b%n;}
a=(a+b-1)%n+1;
cout<<a;
}
2023-11-23 12:30:49
#include <iostream>
using namespace std;
int main(){
long long x,y,c,d;
cin>>x>>y;

c=abs(x)+abs(y);
if (x>0 && y>0) {cout<<0<<' '<<c<<' '<<c<<' '<<0;
}
if (x<0 && y>0) {
cout<<-c<<' '<<0<<' '<<0<<' '<<c;
}
if (x<0 && y<0) {
cout<<-c<<' '<<0<<' '<<0<<' '<<-c;
}

if (x>0 && y<0) {
cout<<0<<' '<<-c<<' '<<c<<' '<<0;
}
}
2023-11-23 12:24:33
#include <cmath>
#include <iostream>
using namespace std;

int main() {

long long a,b,c,d,e,f,g=0,h,i,j,k,l,z,x,y;
cin>>a>>b;
if(12>a){
cout<<"AM";
}
else{
cout<<"PM";
}
return 0;
}
2023-11-23 11:10:01
hyrax.aternos.host:21268
2023-11-23 10:41:14
#include<cmath>
#include<iostream>
using namespace std;
int main(){
int a,b,c,d,e,f,g,h,i;
cin>>a>>b>>c;
d=a*b*c;
e=sqrt(d);
f=e/a;
g=e/b;
h=e/c;
i=(f+g+h)*4;
cout<<i;
}
2023-11-23 08:17:20
#include<iostream>
#include<stdio.h>
#include<math.h>
#include<map>
#include<string>
#include<algorithm>
#include<vector>
#include<string.h>
#include<utility>
#include<set>
#include<cmath>
#include<queue>
#include<deque>
#include<functional>
#include<stack>
#include<limits.h>
#include<iomanip>
#include<unordered_map>
#include<numeric>
#include<tuple>
2023-11-23 02:11:55
69 69 69420
2023-11-22 12:34:09
#include <iostream>
using namespace std;

int main() {
long long n,m;
cin>>n>>m;
if(n%2==0 && m%2==0){
cout<<1;
}
if(n%2==1 && m%2==1){
cout<<1;
}
if(n%2==0 && m%2==1){
cout<<0;
}
if(n%2==1 && m%2==0){
cout<<0;
}
return 0;
}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.