結果
| 問題 |
No.1339 循環小数
|
| コンテスト | |
| ユーザー |
tails
|
| 提出日時 | 2021-01-15 22:14:01 |
| 言語 | cLay (20241019-1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 290 bytes |
| コンパイル時間 | 2,802 ms |
| コンパイル使用メモリ | 173,576 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-05 14:57:02 |
| 合計ジャッジ時間 | 3,900 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 36 |
ソースコード
ll a[1000];
int b[1000];
{
ll@t;
rep(t){
ll@n;
while(n%2==0) n/=2;
while(n%5==0) n/=5;
if(n==1) wt(1),continue;
ll a=1,b=n;
modint x;
x.setmod(n);
while(a+1<b){
ll c=a+b>>1;
x=10;
x**=(n-1)/c;
if(x==1){
a=c;
}else{
b=c;
}
}
wt((n-1)/a);
}
}
tails