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
#include
#include
#include
int rekurzija1(int x, int y, int stepen) { if(x == y) { return 1; } if(y > x) { return 0; } return rekurzija1(x, y * stepen, stepen); } int main() { int n; scanf("%d", &n); // n parovi for(int i = 0; i < n; i++) { int x, y; scanf("%d%d", &x, &y); if(y == 0) { printf("NE\n"); continue; } if(x != 1 && y == 1) { printf("NE\n"); continue; } if(rekurzija1(x, y, y) == 1) { printf("DA\n"); } else { printf("NE\n"); } } 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)