Бодолт илгээх | Бүх бодолтууд | Шилдэг бодолтууд | Жагсаалт руу буцах |
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-03-08 07:45:48
... |
||||||||||||||
2025-02-26 03:39:25
puehhhh |
||||||||||||||
2025-02-20 08:56:38
#include <iostream> using namespace std; long long a,b,c,d,e,f,g,h,x,y,z,i,j,k,l,n=0,m=0; int main() { cin>>a>>b>>c; c=c-1; d=c/b+1; e=c%b+1; cout<<d<<' '<<e; return 0; } |
||||||||||||||
2025-02-18 05:18:05
#include <stdio.h> #include <stdlib.h> void sort(int arr[], int n) { int i, j, temp; for (i = 0; i < n - 1; i++) { for (j = 0; j < n - i - 1; j++) { if (arr[j] > arr[j + 1]) { temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp; } } } } int main() { int numbers[10]; int i; printf("toogo oruulne uu: \n"); for (i = 0; i < 10; i++) { scanf("%d", &numbers[i]); } sort(numbers, 10); printf("Irembelsen too: \n"); for (i = 0; i < 10; i++) { printf("%d ", numbers[i]); } printf("\n"); int hariu = numbers[0] * numbers[9]; printf("hamgiin baga ihiin urjver: %d\n", hariu); return 0; } |
||||||||||||||
2025-02-13 02:40:51
majig chinchonchin panda mn dald or cni bdoj cdax gants bdlogo cn ene blxoor ence bced uldele band mn |
||||||||||||||
2025-02-12 12:10:51
#include <iostream> using namespace std; int main() { int a, b, c, d; cin >> a >> b >> c >> d; int o = 0; if (a == b) { o++; a = b = -1; } if (a == c) { o++; a = c = -1; } if (a == d) { o++; a = d = -1; } if (b == c && b != -1) { o++; b = c = -1; } if (b == d && b != -1) { o++; b = d = -1; } if (c == d && c != -1) { o++; c = d = -1; } cout << o << endl; return 0; } |
||||||||||||||
2025-02-10 05:43:35
#include <iostream> using namespace std; int main() { int n; cin>>n; if(1==n) cout<<"Winter"; if(1<n&&n<5) cout<<"Spring"; if(4<n&&n<8) cout<<"Summer"; if(7<n&&n<11) cout<<"Autumn"; if(10<n&&n<13) cout<<"Winter"; } |
||||||||||||||
2025-02-05 07:58:16
#include<bits/stdc++.h> using namespace std; int main () { int a,b,c,d; cin>>a>>b>>c; d=a+b+c; cout<<d; return 0; } |
||||||||||||||
2025-02-04 05:56:08
#include <stdio.h> int main() { int a, b, c; int result; // Taking input for three integers printf("Enter three numbers: "); scanf("%d %d %d", &a, &b, &c); // Calculating the sum of the three numbers result = a + b + c; // Printing the result printf("Output: %d\n", result); return 0; } |
||||||||||||||
2025-02-04 03:58:41
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int result = a + b + c; cout << result; return 0; } |