#include "coins.h"
#include <bits/stdc++.h>
using namespace std;
std::vector<int> coin_flips(std::vector<int> b, int c) {
std::vector<int> flips(1);
int sum = 0;
for(int i=0; i<64; i++) {
if(b[i]) sum += i;
}
for(int i=0; i<64; i++) {
if((sum+i) % 64 == c) {
flips[0] = i; break;
}
}
return flips;
}
int find_coin(std::vector<int> b) {
int sum = 0;
for(int i=0; i<64; i++) {
if(b[i]) sum += i;
}
return sum % 64;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
8 ms |
1364 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
8 ms |
1364 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
7 ms |
1376 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
6 ms |
1508 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
8 ms |
1364 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |