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-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;
}
2023-11-24 11:13:43
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;
cin>>a>>b>>c>>d;
e=max(a,c);
f=max(b,d);
if(e-(a+c-e)==f-(b+d-f)){
cout<<'1';
}
else
cout<<'0';
}
2023-11-24 10:41:17
#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-24 09:19:03
uilseegayCxns.aternos.me:56333
2023-11-24 09:16:03
stargazer.aternos.host:56333
2023-11-24 02:10:28
yamr hetsu ymbe huurhn badmaa
2023-11-23 12:38:50
#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-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;
}
}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.