結果
| 問題 |
No.434 占い
|
| コンテスト | |
| ユーザー |
butter_roll
|
| 提出日時 | 2016-10-15 03:12:22 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 522 bytes |
| コンパイル時間 | 522 ms |
| コンパイル使用メモリ | 67,408 KB |
| 実行使用メモリ | 14,592 KB |
| 最終ジャッジ日時 | 2024-11-22 10:38:11 |
| 合計ジャッジ時間 | 12,919 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 24 TLE * 3 |
ソースコード
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
#include <iomanip>
#include <typeinfo>
#include <string>
using namespace std;
int main(void){
int T,i,j,k;
string S;
int s[1010100];
int t;
cin>>T;
char c;
getchar();
while(T>=1){
k=0;
while((c=getchar())!='\n'){
s[k]=c-'0';
k++;
}
for(i=0;i<k-1;i++){
for(j=0;j<k-1-i;j++){
s[j]=s[j]+s[j+1];
if(s[j]>9) s[j]-=9;
}
}
cout<<s[0]<<endl;
T--;
}
return 0;
}
butter_roll