我們留言板需要的功能有
- 大家都看的到
- 可以匿名留言
- 不用自己架站
- 免費
以下為主要步驟
詳細步驟
未來將會詳細介紹...
<!-- 這是註解 -->CSS
/* 這是註解 */Javascript
// 單行註解 /* 多行註解 */PHP
// 單行註解 /* 多行註解 */C/C++
// 單行註解 /* 多行註解 */Java
// 單行註解 /* 多行註解 */Python
# 單行註解 ''' 多行註解 '''
<?php // 關閉錯誤訊息 error_reporting(0); // 報告所有錯誤 error_reporting(-1); // 報告所有錯誤(see changelog) error_reporting(E_ALL); // 報告執行期間的錯誤 error_reporting(E_ERROR | E_WARNING | E_PARSE); // 報告除了Notice之外的錯誤 error_reporting(E_ALL ^ E_NOTICE); ?>
<?php $f = @file("C:\helloworld.php"); ?>
<?php $temp = 1; ?>
<?php $$temp = 1; ?>
<?php $temp = 'a'; $$temp = 1; echo $$temp; // 1 echo $a; // 1 ?>
<?php $temp = 'bb'; $$temp = 'a'; $$$temp = 1; echo $bb; // a echo $$bb; // 1 echo $a; // 1 ?>感覺有種變數被替換的感覺
#include <stdio.h> void swap(int *a, int *b) { int c; c = *a; *a = *b; *b = c; } int partition(int arr[], int left, int right) { int i, j, s; s = arr[right]; i = left - 1; for(j = left; j < right; j++) { if(arr[j] > s) { i++; swap(&arr[i], &arr[j]); } } swap(&arr[i+1], &arr[right]); return i+1; } void quicksort(int arr[], int left, int right) { int q; if(left < right) { q = partition(arr, left, right); quicksort(arr, left, q-1); quicksort(arr, q+1, right); } } int main(void) { int i, n, times, arr[40000]; scanf("%d",×); while(times--) { scanf("%d",&n); for(i=0; i<n; i++) scanf("%d",&arr[i]); quicksort(arr, 0, n-1); printf("%d\n",arr[n/2]); } return 0; }
#include<stdio.h> #include<string.h> int main() { int i, len, sum, isminus; char s[10020]; while(scanf("%s",s)==1) { if(s[0] == '-') isminus = 1; else isminus = 0; sum = 0; len = strlen(s); for(i=isminus; i<len; i++) sum += s[i] - '0'; if(sum % 3 == 0) printf("yes\n"); else printf("no\n"); } return 0; }
#include<stdio.h> int main() { int a, n, quotient, remainder, temp_a, temp_b, temp_c, temp_n; while(scanf("%d%d",&a,&n)==2) { if(n == 1) { printf("No Inverse\n"); continue; } temp_n = n; temp_a = 0; temp_b = 1; temp_c = 1; while(1) { quotient = temp_n / a; remainder = temp_n % a; if(remainder == 0) { if(a == 1) printf("%d\n",temp_c<0?(temp_c+n):temp_c); else printf("No Inverse\n"); break; } temp_n = a; a = remainder; temp_c = (temp_a - quotient*temp_b) % n; temp_a = temp_b; temp_b = temp_c; } } return 0; }
#include <stdio.h> int main(int argc, const char * argv[]) { int i,n,temp,arr[2001]; while (scanf("%d",&n)==1) { for (i=1; i<2001; i++) arr[i] = 0; for (i=0; i<n; i++) { scanf("%d",&temp); arr[temp] = 1; } for (i=1; arr[i]==1; i++); printf("%d\n",i); } return 0; }
#include<stdio.h> int main() { int i, n, temp; while(scanf("%d ",&n)==1) { n++; for(i=1; i<n; i++) { scanf("%d",&temp); printf("%d ",i); } printf("\n"); } return 0; }
#include<stdio.h> int main() { int i, n; long long arr[101]={0}; for(i=1; i<101; i++) arr[i] += i*i + arr[i-1]; while(scanf("%lld",&n)==1) { if(n == 0) break; printf("%lld\n",arr[n]); } return 0; }
#include<stdio.h> #include<stdlib.h> #include<string.h> void isword(char word[], int *sum) { int i,len; len = strlen(word); for(i=0; i<len; i++) if('0' > word[i] || word[i] > '9') break; if(i == len) *sum += atoi(word); } int main() { int i, j, k, sum = 0, len, len_word; char s[5000], check, word[1000]; while(gets(s) != NULL) { len = strlen(s); for(i=k=0; i<len; i++) { if(s[i] == ' ') { word[k] = '\0'; isword(word, &sum); k = 0; } else word[k++] = s[i]; } word[k] = '\0'; isword(word, &sum); printf("%d\n",sum); sum = 0; } return 0; }
#include <stdio.h> int main(void) { int i, n; long long arr[51]; arr[1] = 1; arr[2] = 2; for(i=3; i<51; i++) arr[i] = arr[i-1] + arr[i-2]; while(scanf("%d",&n)==1) { if(n == 0) break; printf("%lld\n",arr[n]); } return 0; }
#include<stdio.h> int main() { int i,j,n,m,count; int map[101][101]; count = 1; while(scanf("%d%d",&n,&m)==2) { for(i=0; i<n; i++) for(j=0; j<m; j++) scanf("%d",&map[i][j]); for(i=1; i<n; i++) map[i][0] += map[i-1][0]; for(j=1; j<m; j++) map[0][j] += map[0][j-1]; for(i=1; i<n; i++) for(j=1; j<m; j++) { if(map[i-1][j] > map[i][j-1]) map[i][j] += map[i][j-1]; else map[i][j] += map[i-1][j]; } printf("Case #%d :\n%d\n",count++,map[n-1][m-1]); } return 0; }
#include<stdio.h> int main() { int i,carry; char a[33],b[33],s[33]; char line[34] = "---------------------------------"; char end[34] = "****End of Data******************"; while(scanf("%s%s",a,b)==2) { for(i=0; i<32; i++) { a[i] -= '0'; b[i] -= '0'; } carry = 0; for(i=31; i>-1; i--) { s[i] = a[i] ^ b[i] ^ carry; carry = (a[i] & b[i]) | (b[i] & carry) | (a[i] & carry); } s[32] = '\0'; for(i=0; i<32; i++) { a[i] += '0'; b[i] += '0'; s[i] += '0'; } printf("%s\n%s\n%s\n%s\n%s\n", a, b, line, s, end); } return 0; }
#include<stdio.h> int main() { int m,n; while(scanf("%d%d",&m,&n)==2) { if(m < n) m ^= n ^= m ^= n; while((m = (m % n)) != 0) { m ^= n ^= m ^= n; } printf("%d\n",n); } return 0; }
#include<stdio.h> #include<stdlib.h> int main() { int i,j,t,n,m,x,y,loop,times,mode,count; int pathx[4] = {1,0,-1,0}; int pathy[4] = {0,-1,0,1}; while(scanf("%d",&t)==1) { while(t--) { scanf("%d%d",&n,&m); int **arr = (int**)malloc(sizeof(int *) * n); for(i=0; i<n; i++) arr[i] = (int*)malloc(sizeof(int) * n); count = 0; loop = (n-1) * 2; times = n; mode = 0; if(m == 1) { x = 0; y = -1; for(i=0; i<n; i++) { y = y + 1; arr[x][y] = ++count; } } else { x = -1; y = 0; for(i=0; i<n; i++) { x = x + 1; arr[x][y] = ++count; } } for(i=0; i<loop; i++) { if(i%2 == 0) times--; for(j=0; j<times; j++) { if(m == 1) { x = x + pathx[mode]; y = y + pathy[mode]; } else { x = x + pathy[mode]; y = y + pathx[mode]; } arr[x][y] = ++count; } mode = (mode+1) % 4; } for(i=0; i<n; i++) { for(j=0; j<n; j++) printf("%5d",arr[i][j]); printf("\n"); } if(t != 0) printf("\n"); } } return 0; }
#include<stdio.h> int main() { long a,b,c,d,e,f,temp; scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f); temp = a*e-b*d; if(temp == 0) { if(c*d == a*f) printf("Too many\n"); else printf("No answer\n"); } else { printf("x=%.2f\n",(double)(c*e-b*f)/temp); printf("y=%.2f\n",(double)(c*d-a*f)/-temp); } return 0; }
#include<stdio.h> int main() { int a,b,i,n; char s[10001]; while(scanf("%d%d%d",&a,&b,&n)==3) { printf("%d",a/b); a = a % b; if(n > 0) { for(i=0; i<n; i++) { a = a * 10; s[i] = a / b + '0'; a = a % b; } s[i] = '\0'; printf(".%s",s); } printf("\n"); } return 0; }
from distutils.core import setup import py2exe setup(console=['???.py'])其中, ???.py 就是你要打包的檔案名稱,例如 hello.py。
@echo off echo 開始編譯程式 cd /d G:\program\python\src python setup.py install python setup.py py2exe pause當然第3行要改成你自己的目錄。另外如果檔名不知道怎麼取的話就取"make.bat"吧!
setup(windows=['???.py'])
setup(console=["hello.py", "hello1.py", "hello2.py"])
setup(console=["hello.py", "hello1.py"], windows=["hello2.py"])
setup(console=["hello.py", "hello1.py"], windows=["hello2.py"], data_files=[("img", [r"d:\documents\matrix.jpg", r"d:\documents\Batman.jpg"]), ("xml", [r"D:\tmp\mypaint.xml", r"D:\tmp\mypuzzle.xml", r"D:\tmp\mypuzzle1.xml"])])產生之後的 dist 目錄中,應該會有一 img 目錄,內含 matrix.jpg 和 batman.jpg 兩個檔案,以及 xml 目錄,內含三個 xml 檔案。
#include <stdio.h> int main() { int i,check; char s[2][6],operate[5],nouse[2]; while(scanf(" %s%2c",&s[0],nouse)==2) { printf("%s",s[0]); while(nouse[1]!='\n') { scanf(" %s %s",operate,s[1]); check=0; if(operate[0] == 'n') check=1; if(check) { printf("&&%s",s[1]); for(i=0;i<5;i++) s[0][i] &= s[1][i]; } else { printf("||%s",s[1]); for(i=0;i<5;i++) s[0][i] |= s[1][i]; } scanf("%2c",nouse); } printf(" = %s\n",s[0]); } return 0; }
Figure 1
|
Figure 2
|
Figure3
|
Figure 4
|
#include<stdio.h> int main() { int n,i,judge,count=0,arr[17]={1}; for(i=1;i<17;i++) arr[i] = arr[i-1]*2; while(scanf("%d",&n)==1) { if(n<0) break; for(i=0;n>arr[i];i++); printf("Case %d: %d\n",++count,i); } return 0; }
#include <stdio.h> int main() { int i,j,k,n; while(scanf(" %d",&n)==1 && n!=0) { for(i=0;i<n;i++) { for(j=0;j<(n-i-1);j++) printf("_"); for(k=i+1;k>0;k--) printf("+"); printf("\n"); } } return 0; }
#include<stdio.h> int main() { int i; while(scanf("%d",&i)==1) { if(i<0) { printf("-1\n"); break; } printf("%o\n",i); } return 0; }
#include<stdio.h> int main() { int i,n,check,id[8],add_id_num,add_all; int city[26] = {10,11,12,13,14,15,16,17,34,18,19,20,21,22,35,23,24,25,26,27,28,29,32,30,31,33}; while(scanf("%d",&n)==1) { check = n % 10; n = n / 10; for(i=0; i<8; i++) { id[7-i] = n % 10; n = n / 10; } add_id_num = 0; for(i=0; i<8; i++) add_id_num += id[i]*(8-i); for(i=0; i<26; i++) { add_all = city[i]/10 + city[i]%10*9 + add_id_num; if(((10-(add_all%10))%10) == check) printf("%c",'A'+i); } printf("\n"); } return 0; }