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
2025-04-23 09:43:05
figd_3h_1lK_FdWWz4XA1lVnSw_Jqi8sprFXVFTfTtNWI

https://www.figma.com/design/TZ1FtMpQy45K8NyAl8u9xz/SpaceX-Crew-Dragon-Flight-Control-UI--Community-?node-id=0-1&p=f&t=LZs1CZBfSyHsHbss-0
2025-04-23 04:02:15
fv

Last edit: 2025-04-23 04:03:42
2025-04-22 08:35:47
#include <stdio.h>

int main() {
int mat[5][5];
int oneRow, oneCol;
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
scanf("%d", &mat[i][j]);
if (mat[i][j] == 1) {
oneRow = i;
oneCol = j;
}
}
}
int rowMoves = (oneRow - 2) < 0 ? -(oneRow - 2) : (oneRow - 2);
int colMoves = (oneCol - 2) < 0 ? -(oneCol - 2) : (oneCol - 2);
int totalMoves = rowMoves + colMoves;
printf("%d\n", totalMoves);
return 0;
}
2025-04-16 07:20:33
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Last edit: 2025-04-16 07:21:08
2025-04-14 05:34:47
#include<iostream>
using namespace std;
int main (){
long long a,b,c,d,f,g,j,k,l,x;
cin>>a>>b>>d;
c=a*b;
while(a>0 && b>0){
if(a>b)a%=b;
else b%=a;
}
d=a+b;
f=c/d;
l=f*c;
while(f>0 && d>0){
if(f>d)f%=d;
else d%=f;
}
g=d+f;
k=l/g;
cout<<k;
return 0;
}
2025-04-12 15:34:25
#include <bits/stdc++.h>
using namespace std;

const int MOD = 1e9;

int main() {
int N, K;
cin >> N >> K;
if (N < K) {
cout << 1 % MOD << endl;
return 0;
}
vector<int> A(N + 1);
for (int i = 0; i < K; ++i) {
A[i] = 1;
}
long long sum = K;
for (int i = K; i <= N; ++i) {
A[i] = sum % MOD;
sum = (sum - A[i - K] + A[i] + MOD) % MOD;
}
cout << A[N] % MOD << endl;
}
2025-04-12 14:23:28
#include <iostream>
#include <string>
using namespace std;
int main() {
int N;
cin >> N;
int count = 0;
bool logged_in = false;
for (int i = 0; i < N; ++i) {
string s;
cin >> s;
if (s == "login") { logged_in = true;
} else if (s == "logout") {
logged_in = false;
} else if (s == "private") {
if (!logged_in) {
count++;
}}}
cout << count << endl;
return 0;
}
2025-04-01 02:55:19
#include<Wire.h>
int led = 7;

void setup()
{
Wire.begin(4);
Wire.onReceive(reseiveEvent);
Serial.begin(9600);
pinMode(led, OUTPUT);
}

void loop()
{
delay(100);
}

void reseiveEvent(int howMany){
int x = Wire.read();
if(x == 1){
digitalWrite(led, HIGH);
}
else{
digitalWrite(led,LOW);
}
Serial.println(x);
}
2025-04-01 02:54:08
#include <Wire.h>
int but = 7;

void setup() {
Wire.begin();
pinMode(but, INPUT);
}

int x = 0;

void loop() {
x = digitalRead(but);
Wire.beginTransmission(4);
Wire.write(x);
Wire.endTransmission();

delay(500);
}
2025-03-27 05:23:03
#include <iostream>
using namespace std;

int main() {
int n;
cout << "Массивын хэмжээ оруулна уу: ";
cin >> n;

int arr[n];
cout << "Массивын элемэнтүүдийг оруулна уу: ";
for (int i = 0; i < n; i++) {
cin >> arr[i];
}

cout << "Оруулсан массив: ";
for (int i = 0; i < n; i++) {
}
cout << arr[i] << " ";

return 0;
}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.