結果
問題 |
No.164 ちっちゃくないよ!!
|
ユーザー |
![]() |
提出日時 | 2015-03-12 23:56:18 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 446 bytes |
コンパイル時間 | 1,263 ms |
コンパイル使用メモリ | 158,932 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 22:35:47 |
合計ジャッジ時間 | 1,786 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 10 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ long long int ans; int n; cin>>n; for(int i=0;i<n;i++){ long long int res=0; string input; cin>>input; for(int j=input.size()-1;j>=0;j--){ if(input[j]>='A'){ res+=(long long int)(input[j]-'A'+10)*pow(36.0,(double)input.size()-1-j); }else res+=(input[j]-'0')*pow(36.0,(double)input.size()-1-j); } if(ans=-1)ans=res; else ans=min(ans,res); } cout<<ans<<endl; }