在Linux下輸出long long 類型的是
printf("%lld", a);
在Windows下輸出是
printf("%I64d", a);
xxy學姐:"如果不知道測評機是啥的咋辦?”
“像這樣!!”
#ifdef Linux #define LL "%lld" #else #define LL "%I64d" #endif
這么重要的東西當然要貼在博客里!

stO wxyww Orz(那么認真的給我講題, 表示灰常感謝)

%%%
eg:
#include <cstdio> #include <iostream> #ifdef Linux #define LL "%lld" #else #define LL "%I64d" #endif using namespace std; int main() { long long a; cin >> a; printf(LL, a); return 0; }
艹!我以后要是再寫錯這個玩意兒,我就請yxy吃飯!艹
