結果

問題 No.1465 Archaea
ユーザー yushi529
提出日時 2021-04-15 12:53:43
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 384 bytes
コンパイル時間 1,558 ms
コンパイル使用メモリ 167,456 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-01 11:51:41
合計ジャッジ時間 2,655 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 19 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main() {
   ios::sync_with_stdio(false);
   cin.tie(0);
   int n, k;
   cin >> n >> k;
   if (n % 3 == 0) {
      cout << "NO" << endl;
      return 0;
   }
   int ans = 0;
   while(n > 1) {
      if (n & 1) {
         n -= 3;
      } else {
         n /= 2;
      }
      ans++;
   }
   cout << (ans <= k ? "YES" : "NO") << endl;
}
0