QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#72079#3476. 3D Printed Statuesshefat2002AC ✓2ms3532kbC++141.1kb2023-01-13 23:14:052023-01-13 23:14:06

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-01-13 23:14:06]
  • 评测
  • 测评结果:AC
  • 用时:2ms
  • 内存:3532kb
  • [2023-01-13 23:14:05]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

#define ll      long long
#define nl      cout << "\n";
#define pi      (2*acos(0))
#define case    cout << "Case " << case_number << ": "; case_number++;
#define fast    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define MAX_INT 1000007
#define YES     "Yes"
#define NO      "No"

int case_number = 1;
//knights move
int dr[] = {2, 2, -2, -2, 1, 1, -1, -1};
int dc[] = {1, -1, 1, -1, 2, -2, 2, -2};


void file();
/*----------------------------------------------------------------------------------------------------------------------------------------*/

int a[13], n;


void solve()
{
    int n; cin >> n;
    int count = 1, p = 1;
    while(n > p){
        p *= 2;
        count++;
    }
    cout << count;nl;
}


int main()
{
    //file();
    int n; 
    solve();
    //cin >> n; while(n--){solve();nl;}     // CF
    //cin >> n; while(n--){case;solve();nl;}  // Case 

    return 0;
}

void file()
{
    #ifndef ONLINE_JUDGE
    freopen("in.txt" , "r", stdin);
    freopen("out.txt" , "w", stdout);
    #endif
}

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3336kb

input:

1

output:

1

result:

ok single line: '1'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3232kb

input:

5

output:

4

result:

ok single line: '4'

Test #3:

score: 0
Accepted
time: 1ms
memory: 3232kb

input:

5293

output:

14

result:

ok single line: '14'

Test #4:

score: 0
Accepted
time: 1ms
memory: 3380kb

input:

9176

output:

15

result:

ok single line: '15'

Test #5:

score: 0
Accepted
time: 2ms
memory: 3520kb

input:

2939

output:

13

result:

ok single line: '13'

Test #6:

score: 0
Accepted
time: 2ms
memory: 3388kb

input:

858

output:

11

result:

ok single line: '11'

Test #7:

score: 0
Accepted
time: 2ms
memory: 3388kb

input:

3384

output:

13

result:

ok single line: '13'

Test #8:

score: 0
Accepted
time: 2ms
memory: 3348kb

input:

2023

output:

12

result:

ok single line: '12'

Test #9:

score: 0
Accepted
time: 2ms
memory: 3484kb

input:

3547

output:

13

result:

ok single line: '13'

Test #10:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

9603

output:

15

result:

ok single line: '15'

Test #11:

score: 0
Accepted
time: 0ms
memory: 3488kb

input:

2309

output:

13

result:

ok single line: '13'

Test #12:

score: 0
Accepted
time: 2ms
memory: 3332kb

input:

6091

output:

14

result:

ok single line: '14'

Test #13:

score: 0
Accepted
time: 2ms
memory: 3520kb

input:

358

output:

10

result:

ok single line: '10'

Test #14:

score: 0
Accepted
time: 2ms
memory: 3412kb

input:

1023

output:

11

result:

ok single line: '11'

Test #15:

score: 0
Accepted
time: 2ms
memory: 3384kb

input:

2944

output:

13

result:

ok single line: '13'

Test #16:

score: 0
Accepted
time: 0ms
memory: 3384kb

input:

9

output:

5

result:

ok single line: '5'

Test #17:

score: 0
Accepted
time: 2ms
memory: 3380kb

input:

3370

output:

13

result:

ok single line: '13'

Test #18:

score: 0
Accepted
time: 2ms
memory: 3528kb

input:

2047

output:

12

result:

ok single line: '12'

Test #19:

score: 0
Accepted
time: 2ms
memory: 3532kb

input:

3308

output:

13

result:

ok single line: '13'

Test #20:

score: 0
Accepted
time: 2ms
memory: 3336kb

input:

16

output:

5

result:

ok single line: '5'

Test #21:

score: 0
Accepted
time: 2ms
memory: 3332kb

input:

1492

output:

12

result:

ok single line: '12'

Test #22:

score: 0
Accepted
time: 0ms
memory: 3344kb

input:

3

output:

3

result:

ok single line: '3'

Test #23:

score: 0
Accepted
time: 2ms
memory: 3352kb

input:

7

output:

4

result:

ok single line: '4'

Test #24:

score: 0
Accepted
time: 2ms
memory: 3488kb

input:

513

output:

11

result:

ok single line: '11'

Test #25:

score: 0
Accepted
time: 2ms
memory: 3476kb

input:

63

output:

7

result:

ok single line: '7'

Test #26:

score: 0
Accepted
time: 0ms
memory: 3352kb

input:

256

output:

9

result:

ok single line: '9'

Test #27:

score: 0
Accepted
time: 2ms
memory: 3520kb

input:

2

output:

2

result:

ok single line: '2'

Test #28:

score: 0
Accepted
time: 2ms
memory: 3516kb

input:

10000

output:

15

result:

ok single line: '15'

Test #29:

score: 0
Accepted
time: 2ms
memory: 3296kb

input:

9999

output:

15

result:

ok single line: '15'

Test #30:

score: 0
Accepted
time: 0ms
memory: 3384kb

input:

4

output:

3

result:

ok single line: '3'

Test #31:

score: 0
Accepted
time: 2ms
memory: 3332kb

input:

8191

output:

14

result:

ok single line: '14'

Test #32:

score: 0
Accepted
time: 2ms
memory: 3296kb

input:

8192

output:

14

result:

ok single line: '14'

Test #33:

score: 0
Accepted
time: 2ms
memory: 3236kb

input:

8193

output:

15

result:

ok single line: '15'