結果

問題 No.164 ちっちゃくないよ!!
ユーザー saytakaPCsaytakaPC
提出日時 2015-03-12 23:56:18
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 446 bytes
コンパイル時間 1,196 ms
コンパイル使用メモリ 144,892 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-11 08:03:40
合計ジャッジ時間 1,818 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 1 ms
4,380 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0