problem description
乙個整數,只知道前幾位,不知道末二位,被另乙個整數除盡了,那麼該數的末二位該是什麼呢?
input
輸入資料有若干組,每組資料報含二個整數a,b(0output
對應每組資料,將滿足條件的所有尾數在一行內輸出,格式見樣本輸出。同組資料的輸出,其每個尾數之間空一格,行末沒有空格。
sample input
200 40
1992 95
0 0sample output
00 40 80
15我的見解:簡單的一道題,有不同的思路,如果按數學人的思維就如第乙個**,按機器的思維就是第二個**,話不多說,看懂即領悟,.
**(人的思維)
**(機器思維)#include
using
namespace std;
intmain()
cout << k << endl;
}}
#include
using
namespace std;
intmain()
for(i =
0; i < t; i++)}
}}
hdu 2099 整除的尾數
從這個題目領悟了自己之前沒有注意的一些東西,在後面總結,這裡先貼 include include include using namespace std int main int cnt 0 for int i 0,j 0 i 100 i if a 100 i b 0 cout 1 在開陣列的時候c...
hdu 2099 整除的尾數
problem description 乙個整數,只知道前幾位,不知道末二位,被另乙個整數除盡了,那麼該數的末二位該是什麼呢?input 輸入資料有若干組,每組資料報含二個整數a,b 0 output 對應每組資料,將滿足條件的所有尾數在一行內輸出,格式見樣本輸出。同組資料的輸出,其每個尾數之間空一...
HDU 2099 整除的尾數 (簡單模擬)
problem description 乙個整數,只知道前幾位,不知道末二位,被另乙個整數除盡了,那麼該數的末二位該是什麼呢?input 輸入資料有若干組,每組資料報含二個整數a,b 0output 對應每組資料,將滿足條件的所有尾數在一行內輸出,格式見樣本輸出。同組資料的輸出,其每個尾數之間空一格...