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
2024-11-24 03:31:10
#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int a[7];
for(int i=0;i<7;i++){
cin>>a[i];
}
int s=0;
int k=n;
while(k>0){
k-=a[s];
s++;
if(s==7){
s=0;
}
}
cout<<s<<endl;
return 0;
}
2024-11-24 03:11:07
#include <iostream>
using namespace std;

int main() {
int w;
cin >> w;

if (w % 2 == 0 && w > 2) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}

return 0;
}
2024-11-24 02:41:34
#include <iostream>
using namespace std;

int main() {
int n,k;
cin>>n>>k;
int s=0;
while (n!=0){
s++;
n--;
if(s%k==0){
n++;
}
}

cout<<s;
return 0;
}
2024-11-22 12:47:18
#include<iostream>
using namespace std;
const int MOD = 1e9 + 7;
int main(){
long long int x, n, s = 9;
cin >> n;
long long int a[n + 1], b[n + 1], c[n + 1];
a[1] = 8;
b[1] = 1;
c[1] = 0;
for(int i = 1; i < n; i++){
s = (s * 10) % MOD;
}
for(int i = 2; i <= n; i++){
a[i] = (9 * (((a[i - 1] + b[i - 1]) % MOD + c[i - 1]) % MOD)) % MOD;
b[i] = a[i - 1];
c[i] = b[i - 1];
}
x = ((a[n] + b[n]) % MOD + c[n]) % MOD;
int y = (s - x + MOD) % MOD;
cout << y;
}
2024-11-19 16:25:08


Last edit: 2024-11-19 16:25:36
2024-11-19 06:22:40
10b shu lalruud mine
2024-11-18 09:33:45
khanaaaaaaaaaaaa6y4k.aternos.me:16754
2024-11-15 04:17:12
MIIGAA NIIGAA
2024-11-15 04:09:53
azrag
2024-11-14 05:06:44
Hha
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.