Advertisement
rotti321

BAC 2019 SS mai

Nov 26th, 2021
915
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.88 KB | None | 0 0
  1. 1c 2b 3a 4 b 5b
  2.  
  3. pentru i<-1,n executa
  4.  ...
  5. sf pentru
  6.  
  7. (d.luna==e.dev.luna && d.zi<e.dev.zi) || (d.luna<e.dev.luna)
  8.  
  9.  
  10. 5 10 15 20 25 30 35 40 45 50
  11. 1 2  3   4 5  7  8   9 10 11
  12.            6              12
  13.  
  14. 1 2 3 4 5 6 7 8 9 10
  15.     *     *     *
  16.     1     2     4
  17.  
  18.  
  19. afine caise lamai mere pere
  20.   1     2     3    4    5
  21.  
  22. 1 2
  23. 1 2 3
  24. 1 2 3 4
  25. 1 2 3 4 5
  26. 1 2 3 5
  27. 1 2 4
  28.  
  29. SII matricea a[i][j]=max(5-i,5-j)
  30.  
  31.  
  32. SIII ex 1
  33. #include <iostream>
  34.  
  35. using namespace std;
  36.  
  37. int Egal(int n){
  38.     int k=0;
  39.     while(n!=0){
  40.         if(n%2==1){
  41.             if(k==0){ //retinem prima cifra impara
  42.                 k=n%10;
  43.             }
  44.             else if(k!=n%10){
  45.                 return 0;
  46.             }
  47.         }
  48.         n=n/10;
  49.     }
  50.     return 1;
  51. }
  52.  
  53. int main() {
  54.     cout<<Egal(47777701);
  55.     return 0;
  56. }
  57.  
  58. SIII ex 3
  59. d c b a
  60.   z y x
  61.  
  62. fi=fi-1+fi-2-fi-3
  63. d=c+b-a
  64.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement