Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4.  
  5. int main() {
  6. ios_base::sync_with_stdio(false);
  7. int n = 0;
  8. cin >> n;
  9.  
  10. int ile7 = 0;
  11. while (n > 17) {
  12. ++ile7;
  13. n -= 7;
  14. }
  15. int r = n;
  16.  
  17. if (r == 0) {
  18. for (int i = 0; i < ile7; ++i)
  19. cout << 8;
  20. }
  21. else {
  22. if (r == 17) {
  23. cout << 200;
  24. }
  25. if (r == 16) {
  26. cout << 188;
  27. }
  28. if (r == 15) {
  29. cout << 108;
  30. }
  31. if (r == 14) {
  32. cout << 88;
  33. }
  34. if (r == 13) {
  35. cout << 68;
  36. }
  37. if (r == 12) {
  38. cout << 28;
  39. }
  40. if (r == 11) {
  41. cout << 20;
  42. }
  43. if (r == 10) {
  44. cout << 22;
  45. }
  46. if (r == 9) {
  47. cout << 18;
  48. }
  49. if (r == 8) {
  50. cout << 10;
  51. }
  52. if (r == 7) {
  53. cout << 8;
  54. }
  55. if (r == 6) {
  56. cout << 0;
  57. }
  58. if (r == 5) {
  59. cout << 2;
  60. }
  61. if (r == 4) {
  62. cout << 4;
  63. }
  64. if (r == 3) {
  65. cout << 7;
  66. }
  67. if (r == 2) {
  68. cout << 1;
  69. }
  70. if (r == 1) {
  71. cout << "NIE";
  72. }
  73. }
  74.  
  75. for (int i = 0; i < ile7; ++i)
  76. cout << 8;
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement