結果

問題 No.1462 最弱WEAKER
ユーザー kpinkcatkpinkcat
提出日時 2023-09-06 11:46:52
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 481 bytes
コンパイル時間 1,913 ms
コンパイル使用メモリ 194,580 KB
最終ジャッジ日時 2025-02-16 19:03:12
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include<iostream>
#include<map>
#include<vector>
#include <algorithm>
#include<math.h>
#include <iomanip>
#include<set>
#include <numeric>
#include<string>
using ll = long long;
using namespace std;

int main()
{
    ll n, dsum = 0;
    string s;
    cin >> n;
    while (n){
        s = to_string(n%3) + s;
        n /= 3;
    }
    for (int i = 0; i < s.size(); i++){
        dsum += (s[i] - '0');
    }
    cout << ((dsum%2) ? "No" : "Yes") << endl;
}
0