本站遷移

因為我最近租用了網路空間以及網域,
故本站已遷移至新網站~
這邊的資訊已經正在進行搬移的工作~
希望各位可以到新網站去逛XD

New Website:
http://knightzone.org/

搜尋此網誌

2011年1月18日 星期二

[Zerojudge]a001: 哈囉

基本的範例題,
只要照著題目說的把要求的輸入,
輸出成限定的格式即可。

[C](0ms, 266KB)
#include<stdio.h>
int main( void )
{
char s[10000];
while( scanf( "%s" , s ) != EOF )
printf( "hello, %s\n", s );
return 0;
}
view raw Zerojudgea001.c hosted with ❤ by GitHub


[C++](4ms, 734KB)
#include<iostream>
using namespace std;
int main()
{
string s;
while( cin >> s )
cout << "hello, " << s << endl;
return 0;
}

0 意見:

張貼留言