Re: [問題] #10499

看板ACMCLUB作者 (運命のルーレット廻して)時間19年前 (2005/06/25 21:05), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串6/7 (看更多)
※ 引述《kc655039 (￾NN￾N ￾  )》之銘言: : 教我一下,而且我的不能用long long,VC只能用__int64, 給個用long long的偷懶招: (VC才要 gcc等等其他的就不用了) 利用在online judge裡面 它compile時會定義ONLINE_JUDGE這個symbol這個特性 在程式開頭插入這幾行: #ifdef ONLINE_JUDGE #define i64 long long #else #define i64 __int64 #endif 然後下面要用到long long的地方全部改用i64 如果你要用C形式的輸出入(就是printf及scanf) 要插入的行是 #ifdef ONLINE_JUDGE #define i64 long long #define i64s "%lld" #else #define i64 __int64 #define i64s "%i64d" #endif 然後輸出/入時用 scanf(i64s, &a_long_long_var); scanf(i64s" "i64s, &long_long_var1, &long_long_var2); printf(i64s"\n", a_long_long_var); -- "LPH" is for "Let Program Heal us".... -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.62.178.179
文章代碼(AID): #12lLQt4b (ACMCLUB)
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 6 之 7 篇):
問題
文章代碼(AID): #12lLQt4b (ACMCLUB)