Бодолт илгээх | Бүх бодолтууд | Шилдэг бодолтууд | Жагсаалт руу буцах |
RGB7105 - Нийлбэр 80 |
Өгөгдсөн 4 тооны 80-аас их тоонуудын нийлбэрийг ол.
Input
Нэг мөрөнд Int төрлийн 4 тоо зайгаар тусгаарлагдан өгөгдөнө.
Output
Нийлбэр.
Example
Input: 85 75 96 69 Output: 181
Нэмсэн: | Bataa |
Огноо: | 2011-05-23 |
Хугацааны хязгаарлалт: | 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
|
||||||||||||
2022-06-20 13:26:36
#include <iostream> using namespace std; int main() { // your code here int a, b, c, d, e, f, n, m; cin>>a>>b>>c>>d; if(a <= 80) a=0; if(b <= 80) b=0; if(c <= 80) c=0; if(d <= 80) d=0; n=a+b+c+d; cout<<n; return 0; }khandma to javhaa |
||||||||||||
2022-05-20 03:06:27
#include <iostream> using namespace std; int main() { int n=4,s=0,a[5]; for(int i=0;i<n;i++){ cin>>a[i]; if(a[i]>80){ s=s+a[i]; } } cout<<s; return 0; } hatnaa suga |
||||||||||||
2022-05-11 09:35:27
#include<stdio.h> int main() { int a,b,c,d,sum,n,v,g,h; scanf("%d%d%d%d",&a,&b,&c,&d); if(a>=80) { n=a; } else { n=0; } if(b>=80) { v=b; } else { v=0; } if(c>=80) { g=c; } else { g=0; } if(d>=80) { h=d; } else { h=0; } sum=n+v+g+h; printf("%d",sum); }//c++ |
||||||||||||
2022-04-02 15:00:43
#include <iostream> using namespace std; int main() { int a, b, c, d, s=0; cin >> a >> b >> c >> d; if ( a >= 80 ) s = s + a; if ( b >= 80 ) s = s + b; if ( c >= 80 ) s = s + c; if ( d >= 80 ) s = s + d; cout << s; } |
||||||||||||
2022-03-26 09:44:53
#include <iostream> using namespace std; int main(){ int a, b, c, d, e = 80; cin >> a >> b >> c >> d; if(a <= e) a = 0; if(b <= e) b = 0; if(c <= e) c = 0; if(d <= e) d = 0; int res = a + b + c + d; cout << res ; return 0; } // Teneg hun ch haraad oilgono |
||||||||||||
2022-03-26 09:39:25
#include<bits/stdc++.h> using namespace std; int s,a,b,c,d,n=0; int main (){ cin>>a>>b>>c>>d; if (a>80) a=a+n; else if (a<80) a=n; if (b>80) b=b+n; else if (b<80) b=n; if (c>80) c=c+n; else if (c<80) c=n; if (d>80) d=d+n; else if (d<80) d=n; s=a+b+c+d; cout<<s; return 0; } |
||||||||||||
2022-03-21 08:57:24
hariuga tavihq bol gae shu |
||||||||||||
2022-03-07 09:07:17
#include <iostream> using namespace std; int main() { int a,b,c,d,e=0; cin>>a>>b>>c>>d; {if(a>79) e=e+a; else (e=e+0);} {if(b>79) e=e+b; else (e=e+0);} {if(c>79) e=e+c; else( e=e+0);} {if(d>79) e=e+d; else (e=e+0);} cout<<e<<endl; return 0; } |
||||||||||||
2022-03-01 14:43:56
#include <iostream> using namespace std; int main() { int a, b, c, d, n=0; cin >> a >> b >> c >> d; if ( a > 80 ) n = n + a; else if ( a < 80 ) n = n; if ( b > 80 ) n = n + b; else if ( b < 80 ) n = n; if ( c > 80 ) n = n + c; else if ( c < 80 ) n = n; if ( d > 80 ) n = n + d; else if ( d < 80 ) n = n; cout << n << endl; return 0; } life |
||||||||||||
2022-03-01 08:31:21
#include <bits/stdc++.h> using namespace std; main(){ int a,b,c,d,g=0; cin>>a>>b>>c>>d; if(a>80)g+=a; if(b>80)g+=b; if(c>80)g+=c; if(d>80)g+=d; cout<<g; } for bambuk |