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-08-24 07:53:43
#include <cmath>
#include <iostream>

using namespace std;

int main() {

long long a,b,m,c,i,x,s=0;
cin>>a>>b>>c;
m=a;
if(b>m){
m=b;
}
if(c>m){
m=c;
}
x=a+b+c-m;
if(m>x) {
cout<<(m-x+1);
}
if(m==x) {
cout<<1;
}
if(m<x) {
cout<<0;
}
return 0;

}
2023-08-24 07:37:03
#include <cmath>
#include <iostream>

using namespace std;

int main() {

long long a,b,m,c,i,x,s=0;
cin>>a>>b>>c;
m=a;
if(b>m){
m=b;
}
if(c>m){
m=c;
}
x=a+b+c-m;
if(m>x) {
cout<<(m-x+1);
}
if(m==x) {
cout<<1;
}
if(m<x) {
cout<<0;
}
return 0;

}
2023-08-24 05:05:50
#include <iostream>
using namespace std;

int main() {
long long a,b,c,d,e,f,g,n,k,i,j;
string ug;
cin>>n;
for (i=1;i<=n;i++){
cin >> k >>ug;
a=0;
for(j=0;j<k-10;j++){
if(ug[j]=='8')
a=1;
}
if(a==1){
cout << "Yes" << endl;
}
else
cout << "No" << endl;
}
}
2023-08-24 04:43:47
hi

Last edit: 2023-08-24 04:44:47
2023-08-24 04:03:13
#include <iostream>
using namespace std;
int main() {
long long a,b,c=0,d,g,f,i,j,k,l,too[200000];
cin>>a;
for(i=1;i<=a;i++){
cin>>too[i];
if(too[i]%2==0){
cout<<too[i]/2<<endl;
}
if(too[i]%2==1){
cout<<(too[i]-1)/2<<endl;
}
}
return 0;
}
2023-08-22 08:49:53
yy

Last edit: 2023-08-22 10:21:29
2023-08-22 08:44:07
i love otgontenger kiss love baby

Last edit: 2023-08-22 10:21:58
2023-08-22 08:33:09
→ SourceCopy
#include <iostream>
using namespace std;

int main() {
long long a,b,c,d,e,f,g;
cin>>a>>b>>c;
if (a>b){
cout<<(2*c+2*b+1);
}
if (a==b){
cout<<(2*c+2*a);
}
if (a<b){
cout<<(2*c+2*a+1);
}
}
2023-08-22 08:31:09
#include <iostream>
using namespace std;

int main() {
long long a[1345678],b,c,n,d,f,e,s,i;
cin>>n;
for(i=1; i<=n;i++)
cin>>a[i];
i=n;
while(i>0&&a[i]==a[n]){
i--;
}
cout<<i;
return 0;
}
2023-08-22 08:30:38
#include <iostream>
using namespace std;

int main() {
long long a[1345678],b,c,n,d,f,e,s,i;
cin>>n;
for(i=1; i<=n;i++)
cin>>a[i];
i=n;
while(i>0&&a[i]==a[n]){
i--;
}
cout<<i;
return 0;
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.