結果

問題 No.1330 Multiply or Divide
ユーザー tailstails
提出日時 2021-01-08 22:46:06
言語 cLay
(20240104-1)
結果
WA  
実行時間 -
コード長 325 bytes
コンパイル時間 2,006 ms
コンパイル使用メモリ 161,864 KB
実行使用メモリ 8,696 KB
最終ジャッジ日時 2023-09-19 02:02:35
合計ジャッジ時間 4,618 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,384 KB
testcase_01 AC 9 ms
8,056 KB
testcase_02 WA -
testcase_03 AC 2 ms
7,600 KB
testcase_04 AC 2 ms
7,700 KB
testcase_05 AC 3 ms
7,488 KB
testcase_06 AC 11 ms
8,156 KB
testcase_07 AC 111 ms
8,528 KB
testcase_08 AC 15 ms
8,468 KB
testcase_09 AC 18 ms
8,520 KB
testcase_10 AC 14 ms
8,528 KB
testcase_11 AC 13 ms
8,696 KB
testcase_12 AC 15 ms
8,632 KB
testcase_13 AC 2 ms
7,472 KB
testcase_14 AC 2 ms
7,444 KB
testcase_15 AC 3 ms
7,388 KB
testcase_16 AC 2 ms
7,444 KB
testcase_17 AC 3 ms
7,384 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 10 ms
8,044 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 2 ms
7,492 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 2 ms
7,380 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 AC 18 ms
7,920 KB
testcase_45 AC 23 ms
7,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll a[2d5],e[2d5],d[2d5];
{
	ll@n,@m,@p,b=0,c=0;
	rd(a(n));
	rep(i,n){
		b>?=a[i];
		while(a[i]%p<1){
			a[i]/=p;
			++e[i];
		}
		c>?=a[i];
	}
	if(b>m){
		wt(0);
		exit(0);
	}
	if(c<2){
		wt(-1);
		exit(0);
	}
	d[0]=1;
	rep(i,2d5){
		if(d[i]*b>m){
			wt(i+1);
			exit(0);
		}
		rep(j,n){
			d[i+e[j]+1]>?=d[i]*a[j];
		}
	}
}
0