2023 rcpc
This commit is contained in:
26
2023/rcpc/d2/editorial/c-basketball-655.cpp
Normal file
26
2023/rcpc/d2/editorial/c-basketball-655.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
int n;
|
||||
cin >> n;
|
||||
if (n == 1)
|
||||
{
|
||||
cout << "No";
|
||||
return 0;
|
||||
}
|
||||
if (n % 3 == 0)
|
||||
{
|
||||
cout << 0 << ' ' << n / 3;
|
||||
}
|
||||
else if (n % 3 == 1)
|
||||
{
|
||||
cout << 2 << ' ' << (n - 4) / 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << 1 << ' ' << (n - 2) / 3;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user