結果
問題 | No.677 10^Nの約数 |
ユーザー | mai |
提出日時 | 2018-09-25 23:38:17 |
言語 | Whitespace (0.4) |
結果 |
AC
|
実行時間 | 1,767 ms / 2,000 ms |
コード長 | 4,121 bytes |
コンパイル時間 | 69 ms |
コンパイル使用メモリ | 6,944 KB |
実行使用メモリ | 135,040 KB |
最終ジャッジ日時 | 2024-04-16 08:10:38 |
合計ジャッジ時間 | 11,580 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 7 ms
6,816 KB |
testcase_01 | AC | 17 ms
7,552 KB |
testcase_02 | AC | 28 ms
8,704 KB |
testcase_03 | AC | 41 ms
9,216 KB |
testcase_04 | AC | 61 ms
11,136 KB |
testcase_05 | AC | 86 ms
11,520 KB |
testcase_06 | AC | 139 ms
15,232 KB |
testcase_07 | AC | 190 ms
16,128 KB |
testcase_08 | AC | 259 ms
23,296 KB |
testcase_09 | AC | 333 ms
25,472 KB |
testcase_10 | AC | 441 ms
37,760 KB |
testcase_11 | AC | 542 ms
43,008 KB |
testcase_12 | AC | 655 ms
41,644 KB |
testcase_13 | AC | 806 ms
41,896 KB |
testcase_14 | AC | 964 ms
71,808 KB |
testcase_15 | AC | 1,189 ms
81,792 KB |
testcase_16 | AC | 1,476 ms
78,720 KB |
testcase_17 | AC | 1,709 ms
129,024 KB |
testcase_18 | AC | 1,767 ms
135,040 KB |
ソースコード
func:swap(p,q){let:t;t=*p;*p=*q;*q=t;}func:qsort(begin,end){if(end-begin<=1){return;}let:pv(begin),it(begin+1);swap(begin,(begin+end)/2);while(it<end){if(*pv>*it){swap(pv+1,it);swap(pv,pv+1);pv+=1;}it+=1;}qsort(begin,pv);qsort(pv+1,end);}func:pow(x,p){let:a(1);while(1<=p){a*=x;p-=1;}return:a;}func:main(){let:n;let:stk[399],cnt(0);n=__geti();let:i(0),j(0);while(i<=n){j=0;while(j<=n){stk[cnt]=pow(2,i)*pow(5,j);cnt+=1;j+=1;}i+=1;}stk[cnt]=0;qsort(&stk,&stk+cnt);i=0;cnt-=1;while(i<=cnt){__puti(stk[i]);__putc('\n');i+=1;}}