Skip to content

Instantly share code, notes, and snippets.

@flyotlin
Last active November 20, 2019 16:36
Show Gist options
  • Save flyotlin/ec3cd24f05e5d473660f281cbab52d0c to your computer and use it in GitHub Desktop.
Save flyotlin/ec3cd24f05e5d473660f281cbab52d0c to your computer and use it in GitHub Desktop.

Revisions

  1. flyotlin renamed this gist Nov 20, 2019. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. flyotlin created this gist Nov 4, 2019.
    17 changes: 17 additions & 0 deletions Rare easy problem
    Original 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;
    }