#26234: 為何Wa


10931463@gafe.cksh.tp.edu.tw (凱廷陳)


#include <iostream>

#include <cstdlib>

using namespace std;

int main()

{

   int a;

   while(cin>>a){

    if(a%3==0)

    cout << "yes"<<endl;

   

    else

    cout << "no"<<endl;

   

   } 

 

   //system("pause");

   return 0;

}

 

#26236: Re:為何Wa


chuan53 (eggMan)


因為題目說數字超大,有10000位。用int不可能存的著(long long int 也不行)
應該用string把它當字串處理之類的。判斷3的倍數也不只用%

你可以看看其他的解題報告