Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Author: 曹北健(37509)
- Result: AC Submission_id: 4188056
- Created at: Sat Mar 19 2022 09:03:56 GMT+0800 (China Standard Time)
- Problem: 5382 Time: 5 Memory: 1712
- */
- /*
- Author: 蒋奕(49858)
- Result: TLE Submission_id: 4187882
- Created at: Sat Mar 19 2022 08:49:15 GMT+0800 (China Standard Time)
- Problem: 5382 Time: 1005 Memory: 1700
- */
- #include<stdio.h>
- int main()
- {
- long long num;
- scanf("%lld",&num);
- if(((num)&(num-1))==0)
- printf("Yes\n%lld",num);
- else
- {
- long long i=1;
- while(i<num)
- {
- i*=2;
- }
- printf("No\n%lld",i/2);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment