#15063: 一直有問題


adenpiercehack@gmail.com (Chicago Ctos)


#include <iostream>
#include <cmath>
using namespace std;

int main() {
int M;
int D;
int S ;
for (size_t i = 0; i < 2; i++)
{
cin >> M;
cin >> D;
S = (M * 2 + D) % 3;
if (S == 0)
cout << "普通" << endl;
else if (S == 1)
cout << "吉" << endl;
else
cout << "大吉" << endl;
}


system("pause");
return 0;
}

請問這樣為什麼跑測試為AC但送出答案卻是N/A?

是語法有問題還是基礎錯誤?

請各位大神給個解惑

還有遇上一次輸入兩組數字要如何處理,請一便告訴我,感謝

#15084: Re:一直有問題


ufve0704 (爬 我爬 我爬爬爬 有排行榜這種東西就是要爬 爬過我上面的那...)


#include <iostream>
#include <cmath>
using namespace std;

int main() {
int M;
int D;
int S ;
while(cin>>M>>D)
{

S = (M * 2 + D) % 3;
if (S == 0)
cout << "普通" << endl;
else if (S == 1)
cout << "吉" << endl;
else
cout << "大吉" << endl;
}
return 0;
}




#15165: Re:一直有問題


ufve0704 (爬 我爬 我爬爬爬 有排行榜這種東西就是要爬 爬過我上面的那...)


#include
#include
using namespace std;

int main() {
int M;
int D;
int S ;
while(cin>>M>>D)
{

S = (M * 2 + D) % 3;
if (S == 0)
cout << "普通" << endl;
else if (S == 1)
cout << "吉" << endl;
else
cout << "大吉" << endl;
}
return 0;
}

明明是a003你為何打a002?