#45946: c++最佳解(或許吧)


s310488@student.cysh.cy.edu.tw (umbrella1788)


利用字元距離計算

#include <bits/stdc++.h>
using namespace std;

int main(){
    string m;
    cin >> m;
    for(int i=1;i<7;i++){
        cout << abs(m[i]-m[i-1]);
    }
}