Last active
November 20, 2019 16:36
-
-
Save flyotlin/ec3cd24f05e5d473660f281cbab52d0c to your computer and use it in GitHub Desktop.
Revisions
-
flyotlin renamed this gist
Nov 20, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
flyotlin created this gist
Nov 4, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ #include <iostream> using namespace std; int main() { long long int k, n; while(cin >> k && k != 0){ for(int i = 9; i >= 0; i--){ if((10*k-i)%9 == 0){ //先判斷是否整除 而非先直接除再判斷是否為整數 n = (10*k-i)/9.0; cout << n << " "; } } cout << endl; } return 0; }