Submission #46579050
Source Code Expand
#include <stdio.h>
int main() {
long long N;
scanf("%lld", &N);
while (N % 2 == 0) {
N /= 2;
}
while (N % 3 == 0) {
N /= 3;
}
if (N == 1) {
printf("Yes\n");
} else {
printf("No\n");
}
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - 3-smooth Numbers |
| User | harunoki_dayo |
| Language | C (gcc 12.2.0) |
| Score | 200 |
| Code Size | 295 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 1632 KiB |
Compile Error
Main.c: In function ‘main’:
Main.c:5:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%lld", &N);
| ^~~~~~~~~~~~~~~~~
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt |
| All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_handmade_04.txt, 01_handmade_05.txt, 01_handmade_06.txt, 02_random_07.txt, 02_random_08.txt, 02_random_09.txt, 02_random_10.txt, 02_random_11.txt, 02_random_12.txt, 02_random_13.txt, 02_random_14.txt, 02_random_15.txt, 02_random_16.txt, 02_random_17.txt, 02_random_18.txt, 02_random_19.txt, 02_random_20.txt, 02_random_21.txt, 02_random_22.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_00.txt | AC | 0 ms | 1568 KiB |
| 00_sample_01.txt | AC | 1 ms | 1516 KiB |
| 00_sample_02.txt | AC | 0 ms | 1608 KiB |
| 00_sample_03.txt | AC | 0 ms | 1584 KiB |
| 01_handmade_04.txt | AC | 0 ms | 1528 KiB |
| 01_handmade_05.txt | AC | 0 ms | 1632 KiB |
| 01_handmade_06.txt | AC | 0 ms | 1620 KiB |
| 02_random_07.txt | AC | 0 ms | 1612 KiB |
| 02_random_08.txt | AC | 1 ms | 1556 KiB |
| 02_random_09.txt | AC | 0 ms | 1568 KiB |
| 02_random_10.txt | AC | 1 ms | 1628 KiB |
| 02_random_11.txt | AC | 0 ms | 1556 KiB |
| 02_random_12.txt | AC | 0 ms | 1552 KiB |
| 02_random_13.txt | AC | 0 ms | 1560 KiB |
| 02_random_14.txt | AC | 0 ms | 1556 KiB |
| 02_random_15.txt | AC | 0 ms | 1612 KiB |
| 02_random_16.txt | AC | 1 ms | 1532 KiB |
| 02_random_17.txt | AC | 0 ms | 1624 KiB |
| 02_random_18.txt | AC | 0 ms | 1624 KiB |
| 02_random_19.txt | AC | 1 ms | 1628 KiB |
| 02_random_20.txt | AC | 0 ms | 1632 KiB |
| 02_random_21.txt | AC | 0 ms | 1580 KiB |
| 02_random_22.txt | AC | 1 ms | 1628 KiB |