結果
| 問題 | No.432 占い(Easy) |
| コンテスト | |
| ユーザー |
nmnmnmnmnmnmnm
|
| 提出日時 | 2016-10-14 22:32:36 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 1,008 bytes |
| 記録 | |
| コンパイル時間 | 789 ms |
| コンパイル使用メモリ | 93,040 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-22 07:21:52 |
| 合計ジャッジ時間 | 1,689 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 22 |
ソースコード
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
#define sz size()
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(c) (c).begin(), (c).end()
#define rep(i,a,b) for(ll i=(a);i<(b);++i)
#define clr(a, b) memset((a), (b) ,sizeof(a))
#define ctos(c) string(1,c)
#define print(x) cout<<#x<<" = "<<x<<endl;
#define MOD 1000000007
int main() {
ll T;
cin>>T;
rep(i,0,T){
string s;
cin>>s;
vector<ll> v;
rep(j,0,s.sz){
v.pb(s[j]-'0');
}
while(1){
if(v.sz==1)break;
vector<ll> v1;
rep(j,0,v.sz-1){
ll a = v[j]+v[j+1];
v1.pb(a%10+a/10);
}
v = v1;
}
cout << v[0] << endl;
}
return 0;
}
nmnmnmnmnmnmnm