結果

問題 No.1330 Multiply or Divide
ユーザー tailstails
提出日時 2021-01-08 22:47:20
言語 cLay
(20240104-1)
結果
AC  
実行時間 110 ms / 2,000 ms
コード長 298 bytes
コンパイル時間 1,777 ms
コンパイル使用メモリ 161,932 KB
実行使用メモリ 8,644 KB
最終ジャッジ日時 2023-09-19 02:02:51
合計ジャッジ時間 4,189 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,500 KB
testcase_01 AC 9 ms
8,028 KB
testcase_02 AC 3 ms
7,504 KB
testcase_03 AC 2 ms
7,640 KB
testcase_04 AC 2 ms
7,444 KB
testcase_05 AC 2 ms
7,512 KB
testcase_06 AC 11 ms
7,908 KB
testcase_07 AC 110 ms
8,584 KB
testcase_08 AC 15 ms
8,568 KB
testcase_09 AC 18 ms
8,604 KB
testcase_10 AC 15 ms
8,492 KB
testcase_11 AC 12 ms
8,588 KB
testcase_12 AC 15 ms
8,644 KB
testcase_13 AC 2 ms
7,648 KB
testcase_14 AC 2 ms
7,468 KB
testcase_15 AC 2 ms
7,432 KB
testcase_16 AC 2 ms
7,432 KB
testcase_17 AC 3 ms
7,564 KB
testcase_18 AC 10 ms
8,312 KB
testcase_19 AC 10 ms
8,040 KB
testcase_20 AC 10 ms
8,040 KB
testcase_21 AC 10 ms
8,152 KB
testcase_22 AC 10 ms
8,036 KB
testcase_23 AC 11 ms
8,028 KB
testcase_24 AC 2 ms
7,520 KB
testcase_25 AC 2 ms
7,416 KB
testcase_26 AC 2 ms
7,436 KB
testcase_27 AC 2 ms
7,524 KB
testcase_28 AC 2 ms
7,636 KB
testcase_29 AC 3 ms
7,472 KB
testcase_30 AC 2 ms
7,440 KB
testcase_31 AC 2 ms
7,512 KB
testcase_32 AC 2 ms
7,448 KB
testcase_33 AC 2 ms
7,640 KB
testcase_34 AC 8 ms
8,308 KB
testcase_35 AC 4 ms
7,552 KB
testcase_36 AC 7 ms
8,040 KB
testcase_37 AC 7 ms
8,088 KB
testcase_38 AC 6 ms
7,712 KB
testcase_39 AC 4 ms
7,616 KB
testcase_40 AC 4 ms
7,612 KB
testcase_41 AC 3 ms
7,476 KB
testcase_42 AC 7 ms
8,012 KB
testcase_43 AC 7 ms
8,048 KB
testcase_44 AC 19 ms
7,908 KB
testcase_45 AC 23 ms
8,012 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&&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