結果

問題 No.432 占い(Easy)
ユーザー KuraKura
提出日時 2019-07-27 19:16:01
言語 C++11
(gcc 11.4.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 412 bytes
コンパイル時間 2,494 ms
コンパイル使用メモリ 146,664 KB
実行使用メモリ 4,388 KB
最終ジャッジ日時 2023-09-15 06:33:12
合計ジャッジ時間 5,047 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 3 ms
4,376 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 RE -
testcase_12 AC 5 ms
4,384 KB
testcase_13 AC 5 ms
4,384 KB
testcase_14 RE -
testcase_15 AC 2 ms
4,388 KB
testcase_16 AC 1 ms
4,384 KB
testcase_17 AC 6 ms
4,380 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 AC 3 ms
4,384 KB
testcase_25 AC 3 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
  int t,l;cin>>t;vector<string> s(t),r(t);
  for(int i=0;i<t;i++){
    cin>>s[i];
    l=s[i].length()-1;
    for(int j=l;j>0;j--){
      for(int k=0;k<l;k++){
        r[i][k]=((s[i][k]-'0')+(s[i][k+1]-'0'))%10+((s[i][k]-'0')+(s[i][k+1]-'0'))/10+'0';
      }
      for(int k=0;k<l;k++){
        s[i][k]=r[i][k];
      }
    }
    cout<<s[i][0]<<endl;
  }
}
0