結果
問題 | No.1052 電子機器X |
ユーザー |
![]() |
提出日時 | 2020-05-15 21:33:31 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 1,000 ms |
コード長 | 299 bytes |
コンパイル時間 | 2,424 ms |
コンパイル使用メモリ | 190,928 KB |
最終ジャッジ日時 | 2025-01-10 11:18:25 |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define modulo 1000000007 #define mod(mod_x) ((((long long)mod_x+modulo))%modulo) #define Inf 10000000000000 int main(){ int N,K; cin>>N>>K; int T = K+1; if(N%2==0){ cout<<min(T,N/2)<<endl; } else{ cout<<min(T,N)<<endl; } return 0; }