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; int A = n % 10; int B = (n / 10) % 10; int C = n / 100; int brojac = 0; for(int i = 100; i <= 999; i += 1) { int a = A; int b = B; int c = C; int last_digit = i % 10; if(last_digit == a) { a = -1; } else if(last_digit == b) { b = -1; } else if(last_digit == c) { c = -1; } int middle_digit = (i / 10) % 10; if(middle_digit == a) { a = -1; } else if(middle_digit == b) { b = -1; } else if(middle_digit == c) { c = -1; } int first_digit = i / 100; if(first_digit == a) { a = -1; } else if(first_digit == b) { b = -1; } else if(first_digit == c) { c = -1; } if(a == -1 and b == -1 and c == -1) { brojac += 1; } } cout << brojac << endl; 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)