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-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;
}
2023-11-27 12:09:04
#include<iostream>
#include<math.h>
#include<algorithm>
#include<string>
#include<stdio.h>
#include<stdlib.h>
#include<vector>
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<unordered_map> #include<unordered_set>
#define ll long long
#define ss second
#define ff first
using namespace std;
ll a[200005],s,n,i,k,j,m,l,r,t,aa,bb,ab,ba; pair<ll,pair<ll,ll> > b[1000005];
int main(){
cin>>n>>t;
for(i=1; i<=n; i++)
cin>>a[i];
l=1;
if (a[1]==t)
m=1;
s=a[1];
for(r=2; r<=n; r++) {
s+=a[r];
if (s==t)
m++;
else{
while(s>t){
s-=a[l];
l++;
}
if (s==t)
m++;
}
}
cout<<m;
}
2023-11-27 11:08:46

#include<iostream>
using namespace std;
int main(){
long long a,b,c,x,y,z,i,j,k,l,n,m;
cin>>a>>b>>c;
x=a+a+b+b;
y=a+c+c+a;
z=b+c+c+b;
k=a+b+c;y=min(x,y);
z=min(z,k);
cout<<min(y,z);
}
2023-11-27 10:18:35
#include <iostream>
using namespace std;

int main() {
int i,r,k,s,l;
cin>>l>>r>>k;
s=0;
for(i=l;i<=r;i++){
if(i%k==0)
s++;
}
cout<<s;


return 0;
}
2023-11-24 12:30:45
#include<iostream>
using namespace std;
int main () {
int a, n, m=1, e, b, x, c, d;
cin>>a>>b>>c>>d>>e;
cout<<a-((b*70)+(c*80)+(d*19)+(e*24));
return 0;
}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.