結果

問題 No.1462 最弱WEAKER
ユーザー ethan_hethan_h
提出日時 2021-04-02 22:32:46
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 731 bytes
コンパイル時間 1,383 ms
コンパイル使用メモリ 164,356 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-25 12:43:44
合計ジャッジ時間 2,067 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

//ethan_h
#include<bits/stdc++.h>
using namespace std;
#define ll long long
/*void test(){
ll n,t;cin>>n>>t;
ll s=0;
//string s;cin>>s;
vector<ll>a(n);
for(ll i=0;i<n;i++){
cin>>a[i];
s+=a[i];}
if(s/t){
        int p;
p=s/t;
t-=(p*t);
for(ll i=0;i<n;i++){
    if(t>=a[i]){
        p++;
        t-=a[i];
    }
}
cout<<p<<endl;

}
else{
        int p=0;
    for(ll i=0;i<n;i++){
        if(t>=a[i]){
                p++;
         t-=a[i];

        }

    }
    cout<<p<<endl;
}
*/

int main(){
ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
ll n;
cin>>n;
ll c=0;
while(n){
        //c++;
ll p=log(n)/log(3);
ll k=pow(3,p);
n-=k;
//cout<<n<<" ";
c++;
}
if(c&1){
    cout<<"No";
}
else{
    cout<<"Yes";
}




return 0;}
0