Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#include
using namespace std; int main() { int n; cin >> n; for (int i = 9999; i >= 1000; i-- ) { int cifra = i; int x = 0; int b = 0; while (cifra > 0) { x = cifra % 10; cifra = cifra / 10; if (x == 0) { b += 6; } else if (x == 1) { b += 3; } else if (x == 2) { b += 5; } else if (x == 3) { b += 5; } else if (x == 4) { b += 4; } else if (x == 5) { b += 5; } else if (x == 6) { b += 5; } else if ( x == 7) { b += 3; } else if ( x == 8) { b += 7; } else if (x == 9) { b += 5; } } if (b == n) { cout << i; return 0; } } cout << -1; return 0; }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)