結果

問題 No.1462 最弱WEAKER
ユーザー soldray
提出日時 2021-04-12 18:22:00
言語 C++17(clang)
(17.0.6 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 291 bytes
コンパイル時間 1,684 ms
コンパイル使用メモリ 118,144 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-28 15:09:54
合計ジャッジ時間 2,492 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <iostream>
#include <string>

using namespace std;

int main() {
  int N; cin >> N;

  int cnt = 0;

  while (N > 0) {
    cnt += (N % 3);
    N /= 3;
  }

  if (cnt % 2 == 0) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  
  return 0;
}
0