結果
| 問題 | No.434 占い |
| コンテスト | |
| ユーザー |
butter_roll
|
| 提出日時 | 2016-10-15 03:12:22 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 901 ms / 2,000 ms |
| コード長 | 522 bytes |
| 記録 | |
| コンパイル時間 | 486 ms |
| コンパイル使用メモリ | 87,476 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-16 13:01:31 |
| 合計ジャッジ時間 | 4,936 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 27 |
ソースコード
#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