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-30 10:20:37
uilseegay.aternos.me:31657
2023-11-29 10:40:48
#include<iostream>
using namespace std;
int main(){ int a,b,n,c,d;
cin>>n;
if (n%7==6) cout<<n/7*2+1<<' ';
else cout<<n/7*2<<' ';
if (n%7>1) cout<<n/7*2+2;
else cout<<n/7*2+n%7;
}
2023-11-28 12:30:41
#include <iostream>
using namespace std;
int main() {
int a,n,b,c,x,y,z,k;
cin>>a>>b;
if (a!=2 && b<=28){
cout<<a<<" "<<b+2;
}
if (a==1 && b==29){
cout<<a<<" "<<b+2;
}
if (a==1 && b==30){
cout<<a+1<<" "<<1;
}
if (a==1 && b==31){
cout<<a+1<<" "<<2;
}
if (a==2 && b<=26){
cout<<a<<" "<<b+2;
}
if (a==2 && b==27){
cout<<a+1<<" "<<1;
}
if (a==2 && b==28){
cout<<a+1<<" "<<2;
}
if (a==3 && b==29){
cout<<a<<" "<<b+2;
}
if (a==3 && b==30){
cout<<a+1<<" "<<1;
}
if (a==3 && b==31){
cout<<a+1<<" "<<2;
}
if (a==4 && b==29){
cout<<a+1<<" "<<1;
}
if (a==4 && b==30){
cout<<a+1<<" "<<2;
}
if (a==5 && b==29){
cout<<a<<" "<<b+2;
}
if (a==5 && b==30){
cout<<a+1<<" "<<1;
}
if (a==5 && b==31){
cout<<a+1<<" "<<2;
}
if (a==6 && b==29){
cout<<a+1<<" "<<1;
}
if (a==6 && b==30){
cout<<a+1<<" "<<2;
}
if (a==7 && b==29){
cout<<a<<" "<<b+2;
}
if (a==7 && b==30){
cout<<a+1<<" "<<1;
}
if (a==7 && b==31){
cout<<a+1<<" "<<2;
}
if (a==8 && b==29){
cout<<a<<" "<<b+2;
}
if (a==8 && b==30){
cout<<a+1<<" "<<1;
}
if (a==8 && b==31){
cout<<a+1<<" "<<2;
}
if (a==9 && b==29){
cout<<a+1<<" "<<1;
}
if (a==9 && b==30){
cout<<a+1<<" "<<2;
}
if (a==10 && b==29){
cout<<a<<" "<<b+2;
}
if (a==10 && b==30){
cout<<a+1<<" "<<1;
}
if (a==10 && b==31){
cout<<a+1<<" "<<2;
}
if (a==11 && b==29){
cout<<a+1<<" "<<1;
}
if (a==11 && b==30){
cout<<a+1<<" "<<2;
}
if (a==12 && b==29){
cout<<a<<" "<<b+2;
}
if (a==12 && b==30){
cout<<1<<" "<<1;
}
if (a==12 && b==31){
cout<<1<<" "<<2;
}
}
2023-11-28 12:13:41
#include<iostream>
using namespace std;
int main(){ int Sn,a,b,c,x,d,w,y,z,i,j,k,l,n=0,m=0; cin>>n>>m>>a>>b;
if (m*a<=b)
cout<<n*a;
else { c=n/m; d=n%m;
cout<<c*b+d*a;
}
}
2023-11-28 10:28:56
uilsjargalisgayBaEq.aternos.me:29619
2023-11-28 10:21:08
#include <iostream>
using namespace std;

main() {
int n,a,b,c,d;
cin>>n;
a=(n%10);
b=(n/10)%10;
c=(n/100);
if ( a==b && b==c && a==c)
cout<<"yes";

else
cout<<"no";

return 0;
}
2023-11-28 07:32:31
...

Last edit: 2023-11-28 07:32:54
2023-11-28 07:32:16
...


Last edit: 2023-11-28 07:32:46
2023-11-28 07:31:30
...

Last edit: 2023-11-28 07:33:02
2023-11-28 07:25:16
#include<iostream>
using namespace std;
int main(){
long long a,b,c,d,x,y;
cin>>a>>b>>c>>d;
x=a-c;
y=b-d;
if(x<0) x=-x;
if(y<0) y=-y;
if(x>y)
cout<<x;
else
cout<<y;
}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.