結果

問題 No.1330 Multiply or Divide
ユーザー tailstails
提出日時 2021-01-13 19:41:15
言語 cLay
(20240104-1)
結果
AC  
実行時間 11 ms / 2,000 ms
コード長 402 bytes
コンパイル時間 2,444 ms
コンパイル使用メモリ 161,292 KB
実行使用メモリ 5,968 KB
最終ジャッジ日時 2023-09-19 02:02:40
合計ジャッジ時間 4,499 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,392 KB
testcase_01 AC 6 ms
5,852 KB
testcase_02 AC 2 ms
5,420 KB
testcase_03 AC 2 ms
5,408 KB
testcase_04 AC 2 ms
5,368 KB
testcase_05 AC 2 ms
5,364 KB
testcase_06 AC 3 ms
5,384 KB
testcase_07 AC 6 ms
5,720 KB
testcase_08 AC 11 ms
5,720 KB
testcase_09 AC 8 ms
5,648 KB
testcase_10 AC 10 ms
5,696 KB
testcase_11 AC 9 ms
5,660 KB
testcase_12 AC 10 ms
5,652 KB
testcase_13 AC 2 ms
5,384 KB
testcase_14 AC 2 ms
5,576 KB
testcase_15 AC 2 ms
5,516 KB
testcase_16 AC 2 ms
5,392 KB
testcase_17 AC 2 ms
5,360 KB
testcase_18 AC 7 ms
5,680 KB
testcase_19 AC 7 ms
5,888 KB
testcase_20 AC 7 ms
5,744 KB
testcase_21 AC 7 ms
5,680 KB
testcase_22 AC 7 ms
5,688 KB
testcase_23 AC 7 ms
5,684 KB
testcase_24 AC 2 ms
5,428 KB
testcase_25 AC 2 ms
5,400 KB
testcase_26 AC 2 ms
5,368 KB
testcase_27 AC 2 ms
5,660 KB
testcase_28 AC 3 ms
5,508 KB
testcase_29 AC 2 ms
5,384 KB
testcase_30 AC 2 ms
5,436 KB
testcase_31 AC 2 ms
5,356 KB
testcase_32 AC 2 ms
5,380 KB
testcase_33 AC 2 ms
5,392 KB
testcase_34 AC 5 ms
5,712 KB
testcase_35 AC 3 ms
5,384 KB
testcase_36 AC 5 ms
5,968 KB
testcase_37 AC 5 ms
5,688 KB
testcase_38 AC 3 ms
5,368 KB
testcase_39 AC 4 ms
5,436 KB
testcase_40 AC 3 ms
5,444 KB
testcase_41 AC 3 ms
5,408 KB
testcase_42 AC 5 ms
5,820 KB
testcase_43 AC 6 ms
5,672 KB
testcase_44 AC 3 ms
5,572 KB
testcase_45 AC 5 ms
5,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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