結果

問題 No.295 hel__world
ユーザー Kmcode1
提出日時 2015-10-23 23:43:47
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
RE  
実行時間 -
コード長 311 bytes
コンパイル時間 1,256 ms
コンパイル使用メモリ 157,688 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-23 20:36:45
合計ジャッジ時間 2,958 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 4
other RE * 53
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:13:6: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   13 | scanf("%lld",&k);
      | ~~~~~^~~~~~~~~~~

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
string s;
bool ap[26];
long long int ans=0;
int main(){
cin>>s;
for(int i=0;i<s.size();i++){
ap[s[i]-'a']=true;
}
for(int i=0;i<26;i++){
long long int k;
scanf("%lld",&k);
if(ap[i]==false){
continue;
}
ans+=k;
if(ans>100000LL){
puts("hel");
return 0;
}
}
return 1;
}
0