Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- using ll = long long;
- using ld = long double;
- const int INF = 1e9;
- //Acımasızca geçip giden zamandan
- //Geriye kalan sadece yalnızlıklarımız
- int main(){
- ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
- int k; cin>>k;
- int n = 1;
- ll sum = 0;
- while(true){
- sum += n;
- if(sum % k == 0){
- cout << n << "\n";
- break;
- }
- n++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement