結果

問題 No.1052 電子機器X
ユーザー umezo
提出日時 2020-05-15 21:53:40
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 494 bytes
コンパイル時間 2,763 ms
コンパイル使用メモリ 222,572 KB
最終ジャッジ日時 2025-01-10 11:33:55
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 1 TLE * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

#include <bits/stdc++.h>
using namespace std;


int main(){
  ll n,k;
  cin>>n>>k;
  
  set<ll> s;
  for(ll i=-k;i<=k;i+=2) s.insert(i%n);
  
  cout<<s.size()<<endl;  
  
  return 0;
}
0