Submission
Id | When | Author | Problem | Language | CPU | Memory | Verdict |
---|---|---|---|---|---|---|---|
17910 | 2024-04-24 09:06:27 | ewu_intra24_mock_u_84 | Binary Prime | C | 0 ms | 1544 kb | Wrong Answer - 2 |
Test Cases
CPU | Memory | Verdict | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
1 | 0 ms | 1544 kb | Accepted | ||||||||
2 | 0 ms | 1536 kb | Wrong Answer | ||||||||
3 | - | - | Skipped | ||||||||
4 | - | - | Skipped | ||||||||
5 | - | - | Skipped | ||||||||
6 | - | - | Skipped | ||||||||
7 | - | - | Skipped | ||||||||
8 | - | - | Skipped | ||||||||
9 | - | - | Skipped | ||||||||
10 | - | - | Skipped | ||||||||
11 | - | - | Skipped | ||||||||
Source Code
program.c
#include <stdio.h> #include <stdbool.h> bool Isprime(int num){ if (num <= 1) return 0; if (num <= 3) return 1; if (num % 2 == 0 || num % 3 == 0) return 0; for (int i = 5; i * i <= num; i = i + 6) { if (num % i == 0 || num % (i + 2) == 0) return 0; } return 1; } int main() { int a[20], n, t, i, sum = 0, flag = 0; if(1<= t && t<=100){ for(int j = 1; j<=t;j++){ if(1<= n && n<=1000000000000){ for(i = 0;n>0; i++){ a[i] = n%2; n = n/2; } for(i = i - 1; i>=0; i--){ sum += a[i]; } } } } return 0; }