結果

問題 No.1417 100の倍数かつ正整数(2)
ユーザー tailstails
提出日時 2022-11-17 22:27:56
言語 cLay
(20240104-1)
結果
AC  
実行時間 3 ms / 3,000 ms
コード長 1,265 bytes
コンパイル時間 3,274 ms
コンパイル使用メモリ 179,316 KB
実行使用メモリ 7,752 KB
最終ジャッジ日時 2023-10-19 12:45:24
合計ジャッジ時間 5,344 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,744 KB
testcase_01 AC 3 ms
7,744 KB
testcase_02 AC 3 ms
7,744 KB
testcase_03 AC 2 ms
7,744 KB
testcase_04 AC 2 ms
7,744 KB
testcase_05 AC 2 ms
7,744 KB
testcase_06 AC 3 ms
7,744 KB
testcase_07 AC 2 ms
7,744 KB
testcase_08 AC 3 ms
7,744 KB
testcase_09 AC 2 ms
7,744 KB
testcase_10 AC 2 ms
7,744 KB
testcase_11 AC 2 ms
7,744 KB
testcase_12 AC 2 ms
7,744 KB
testcase_13 AC 2 ms
7,744 KB
testcase_14 AC 2 ms
7,744 KB
testcase_15 AC 3 ms
7,744 KB
testcase_16 AC 2 ms
7,744 KB
testcase_17 AC 2 ms
7,744 KB
testcase_18 AC 3 ms
7,744 KB
testcase_19 AC 2 ms
7,744 KB
testcase_20 AC 2 ms
7,744 KB
testcase_21 AC 3 ms
7,744 KB
testcase_22 AC 2 ms
7,744 KB
testcase_23 AC 2 ms
7,744 KB
testcase_24 AC 3 ms
7,744 KB
testcase_25 AC 2 ms
7,744 KB
testcase_26 AC 2 ms
7,744 KB
testcase_27 AC 2 ms
7,744 KB
testcase_28 AC 3 ms
7,744 KB
testcase_29 AC 2 ms
7,744 KB
testcase_30 AC 2 ms
7,748 KB
testcase_31 AC 3 ms
7,748 KB
testcase_32 AC 3 ms
7,744 KB
testcase_33 AC 2 ms
7,748 KB
testcase_34 AC 3 ms
7,752 KB
testcase_35 AC 2 ms
7,752 KB
testcase_36 AC 3 ms
7,752 KB
testcase_37 AC 3 ms
7,752 KB
testcase_38 AC 3 ms
7,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

Mint a00,a01,a02,a10,a11,a12,a20,a21,a22;
ll b2=0,b5=0;
string@n;
for(char c:n){
	int d=c-'0';
	a22=a12*1+a20*2+a21*4+a22*9;
	a21=a11*1+a20*2+a21*5;
	a20=a10*1+a20*5;
	a12=a02*1+a10*2+a11*4+a12*8;
	a11=a01*1+a10*2+a11*4;
	a10=a00*1+a10*4;
	a02=a00*2+a01*4+a02*8;
	a01=a00*2+a01*4;
	a00=a00*4;
	if(b5==0){
		if(b2==0){
			a00+=(d>1)+(d>3)+(d>7);
			a01+=(d>2)+(d>6);
			a02+=(d>4)+(d>8);
			a10+=(d>5);
		}
		if(b2==1){
			a01+=(d>1)+(d>3)+(d>7);
			a02+=(d>2)+(d>4)+(d>6)+(d>8);
			a11+=(d>5);
		}
		if(b2==2){
			a02+=(d>1)+(d>2)+(d>3)+(d>4)+(d>6)+(d>7)+(d>8);
			a12+=(d>5);
		}
	}
	if(b5==1){
		if(b2==0){
			a10+=(d>1)+(d>3)+(d>7);
			a11+=(d>2)+(d>6);
			a12+=(d>4)+(d>8);
			a20+=(d>5);
		}
		if(b2==1){
			a11+=(d>1)+(d>3)+(d>7);
			a12+=(d>2)+(d>4)+(d>6)+(d>8);
			a21+=(d>5);
		}
		if(b2==2){
			a12+=(d>1)+(d>2)+(d>3)+(d>4)+(d>6)+(d>7)+(d>8);
			a22+=(d>5);
		}
	}
	if(b5==2){
		if(b2==0){
			a20+=(d>1)+(d>3)+(d>5)+(d>7);
			a21+=(d>2)+(d>6);
			a22+=(d>4)+(d>8);
		}
		if(b2==1){
			a21+=(d>1)+(d>3)+(d>5)+(d>7);
			a22+=(d>2)+(d>4)+(d>6)+(d>8);
		}
		if(b2==2){
			a22+=(d>1)+(d>2)+(d>3)+(d>4)+(d>5)+(d>6)+(d>7)+(d>8);
		}
	}
	a00+=1;
    b2+=(b2<2)&0524>>d;
    b2+=(b2<2)&0420>>d;
    b5+=(b5<2)&0040>>d;
	if(d==0) b2=b5=3;
}
wt(a22+(b5==2&&b2==2));
0