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; if(n % 4 == 0) { cout << 0 << endl; // we do not have to buy any more apples to split them equally between our nephews } else if((n + 1) % 4 == 0) { cout << 9 << endl; // we have to buy 1 apple with the cost of 9MKD to have apples which we can split between our nephews } else if((n + 2) % 4 == 0) { cout << 18 << endl; // we have to buy 2 apples with the cost of 18MKD to have apples which we can split between our nephews } else if((n + 3) % 4 == 0) { cout << 27 << endl; // we have to buy 3 more apples with the cost of 27MKD to have apples which can split between our nephews } 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)