提出 #46558729


ソースコード 拡げる

#include<bits/stdc++.h>
using namespace std;
#define int long long
inline int read(){int x=0,f=1;char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1;
ch=getchar();}while(ch>='0'&&ch<='9'){x=(x<<1)+
(x<<3)+(ch^48);ch=getchar();}return x*f;}
#define Z(x) (x)*(x)
#define pb push_back
//#define M
//#define mo
//#define N
int n, m, i, j, k, T;

signed main()
{
//	freopen("in.txt", "r", stdin);
//	freopen("out.txt", "w", stdout);
//	srand(time(NULL));
//	T=read();
//	while(T--) {
//
//	}
	n=read(); 
	while(n%2==0) n/=2; 
	while(n%3==0) n/=3; 
	printf(n==1 ? "Yes\n" : "No\n"); 
	return 0;
}

提出情報

提出日時
問題 B - 3-smooth Numbers
ユーザ zhangtingxi
言語 C++ 20 (gcc 12.2)
得点 200
コード長 625 Byte
結果 AC
実行時間 1 ms
メモリ 3740 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 4
AC × 23
セット名 テストケース
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
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 1 ms 3580 KiB
00_sample_01.txt AC 1 ms 3668 KiB
00_sample_02.txt AC 1 ms 3736 KiB
00_sample_03.txt AC 1 ms 3732 KiB
01_handmade_04.txt AC 1 ms 3652 KiB
01_handmade_05.txt AC 1 ms 3660 KiB
01_handmade_06.txt AC 1 ms 3728 KiB
02_random_07.txt AC 1 ms 3536 KiB
02_random_08.txt AC 1 ms 3740 KiB
02_random_09.txt AC 1 ms 3580 KiB
02_random_10.txt AC 1 ms 3572 KiB
02_random_11.txt AC 1 ms 3616 KiB
02_random_12.txt AC 1 ms 3656 KiB
02_random_13.txt AC 1 ms 3660 KiB
02_random_14.txt AC 1 ms 3520 KiB
02_random_15.txt AC 1 ms 3600 KiB
02_random_16.txt AC 1 ms 3560 KiB
02_random_17.txt AC 1 ms 3664 KiB
02_random_18.txt AC 1 ms 3656 KiB
02_random_19.txt AC 1 ms 3732 KiB
02_random_20.txt AC 1 ms 3536 KiB
02_random_21.txt AC 1 ms 3652 KiB
02_random_22.txt AC 1 ms 3656 KiB