結果
問題 | No.1462 最弱WEAKER |
ユーザー |
|
提出日時 | 2021-04-02 22:32:46 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 731 bytes |
コンパイル時間 | 1,679 ms |
コンパイル使用メモリ | 165,524 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-23 20:10:45 |
合計ジャッジ時間 | 2,442 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 18 |
ソースコード
//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;}