結果
問題 | No.677 10^Nの約数 |
ユーザー | mai |
提出日時 | 2018-09-26 00:05:41 |
言語 | Whitespace (0.4) |
結果 |
TLE
|
実行時間 | - |
コード長 | 4,752 bytes |
コンパイル時間 | 125 ms |
コンパイル使用メモリ | 7,076 KB |
実行使用メモリ | 123,904 KB |
最終ジャッジ日時 | 2024-04-16 11:41:33 |
合計ジャッジ時間 | 13,700 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 7 ms
5,888 KB |
testcase_01 | AC | 17 ms
7,168 KB |
testcase_02 | AC | 32 ms
8,576 KB |
testcase_03 | AC | 49 ms
9,728 KB |
testcase_04 | AC | 74 ms
10,624 KB |
testcase_05 | AC | 98 ms
11,520 KB |
testcase_06 | AC | 147 ms
14,336 KB |
testcase_07 | AC | 203 ms
15,360 KB |
testcase_08 | AC | 293 ms
21,632 KB |
testcase_09 | AC | 378 ms
24,576 KB |
testcase_10 | AC | 456 ms
34,816 KB |
testcase_11 | AC | 646 ms
40,960 KB |
testcase_12 | AC | 814 ms
42,880 KB |
testcase_13 | AC | 1,106 ms
65,408 KB |
testcase_14 | AC | 988 ms
65,408 KB |
testcase_15 | AC | 1,329 ms
74,752 KB |
testcase_16 | AC | 1,718 ms
71,736 KB |
testcase_17 | AC | 1,923 ms
123,904 KB |
testcase_18 | TLE | - |
ソースコード
func:swap(p,q){let:t;t=*p;*p=*q;*q=t;}func:qsort(begin,end){if(end-begin<=1){return;}if(end-begin==2){end-=1;if(*begin>*(end)){swap(begin,end);}return;}let:pv(begin),it(begin+1);let:t;swap(begin,(begin+end)/2);while(it<end){if(*pv>=*it){t=*(pv+1);*(pv+1)=*it;*it=t;t=*pv;*pv=*(pv+=1);*(pv)=t;}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;}}