結果

問題 No.1339 循環小数
ユーザー tailstails
提出日時 2021-01-15 22:20:36
言語 cLay
(20240104-1)
結果
AC  
実行時間 47 ms / 2,000 ms
コード長 407 bytes
コンパイル時間 10,560 ms
コンパイル使用メモリ 219,932 KB
実行使用メモリ 9,928 KB
最終ジャッジ日時 2023-09-19 02:03:38
合計ジャッジ時間 9,646 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
9,692 KB
testcase_01 AC 10 ms
9,704 KB
testcase_02 AC 9 ms
9,720 KB
testcase_03 AC 10 ms
9,928 KB
testcase_04 AC 10 ms
9,692 KB
testcase_05 AC 10 ms
9,740 KB
testcase_06 AC 10 ms
9,844 KB
testcase_07 AC 10 ms
9,776 KB
testcase_08 AC 9 ms
9,796 KB
testcase_09 AC 10 ms
9,776 KB
testcase_10 AC 10 ms
9,772 KB
testcase_11 AC 10 ms
9,704 KB
testcase_12 AC 10 ms
9,696 KB
testcase_13 AC 10 ms
9,928 KB
testcase_14 AC 10 ms
9,808 KB
testcase_15 AC 10 ms
9,808 KB
testcase_16 AC 10 ms
9,688 KB
testcase_17 AC 10 ms
9,740 KB
testcase_18 AC 10 ms
9,736 KB
testcase_19 AC 10 ms
9,704 KB
testcase_20 AC 10 ms
9,740 KB
testcase_21 AC 18 ms
9,748 KB
testcase_22 AC 19 ms
9,708 KB
testcase_23 AC 19 ms
9,704 KB
testcase_24 AC 18 ms
9,740 KB
testcase_25 AC 20 ms
9,696 KB
testcase_26 AC 21 ms
9,816 KB
testcase_27 AC 19 ms
9,916 KB
testcase_28 AC 19 ms
9,768 KB
testcase_29 AC 17 ms
9,704 KB
testcase_30 AC 18 ms
9,712 KB
testcase_31 AC 47 ms
9,796 KB
testcase_32 AC 47 ms
9,848 KB
testcase_33 AC 19 ms
9,776 KB
testcase_34 AC 11 ms
9,740 KB
testcase_35 AC 43 ms
9,800 KB
testcase_36 AC 19 ms
9,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll euler(ll a){
	ll p=a;
	ll i=2;
	while(a>1){
		if(a%i==0){
			p-=p/i;
		}
		while(a%i==0){
			a/=i;
		}
		++i;
		if(i*i>a){
			i=a;
		}
	}
	return p;
}


ll d[1d5];
{
	ll@t;
	rep(t){
		ll@n;
		while(n%2==0) n/=2;
		while(n%5==0) n/=5;
		if(n==1) wt(1),continue;
		Divisor(euler(n),d);
		modint x;
		x.setmod(n);
		ll a=0;
		while(1){
			x=10;
			x**=d[a];
			if(x==1) break;
			++a;
		}
		wt(d[a]);
	}
}
0