1086 就不告訴你 (15 分)
阿新 • • 發佈:2019-04-19
urn flag pan iostream cin ios class == ret
#include <iostream> using namespace std; int arr[100] = {0}; int main(){ int n, m, sum; cin >> n >> m; sum = n * m; if (sum == 0) cout << 0 << endl; else{ int i = 0, flag = 0; while (sum != 0){ arr[i++] = sum % 10; sum /= 10; } for (int t = 0; t < i; t++){ if (arr[t] != 0) flag = 1; if (flag == 1) cout << arr[t]; } } cout << endl; return 0; }
1086 就不告訴你 (15 分)