Skip to content

Commit

Permalink
add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
zehengl committed Dec 15, 2023
1 parent eabe5f7 commit 2606966
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/distributingpoffins.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include <iostream>

using namespace std;

int main()
{
long long n, m;
cin >> n >> m;

if (m % n == 0)
{
cout << 0;
}
else
{
cout << 1;
}

return 0;
}
6 changes: 6 additions & 0 deletions src/distributingpoffins.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
n, m = io.read("*n", "*n")
if m % n == 0 then
print(0)
else
print(1)
end
2 changes: 2 additions & 0 deletions src/distributingpoffins.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
n, m = [int(d) for d in input().split()]
print(1 if m % n else 0)

0 comments on commit 2606966

Please sign in to comment.