提出 #72678989


ソースコード 拡げる

#include<bits/stdc++.h>
#define ll long long
#define int long long
using namespace std;
void solve()
{
   string s; cin>>s;
   int ans=0;
   for(int i=0;i<s.size();i++)
   {
        if(s[i]=='i' || s[i]=='j')ans++;
   }
   cout<<ans<<endl;
}
main()
{
    ios::sync_with_stdio(false);
    cin.tie(NULL);

    // ll t=1;cin>>t;
    // while(t--)
    {
        solve();
    }
    return 0;
}

提出情報

提出日時
問題 A - Count .
ユーザ faritu23
言語 C++23 (GCC 15.2.0)
得点 100
コード長 415 Byte
結果 AC
実行時間 1 ms
メモリ 3624 KiB

コンパイルエラー

./Main.cpp: In function 'void solve()':
./Main.cpp:10:17: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   10 |    for(int i=0;i<s.size();i++)
      |                ~^~~~~~~~~
./Main.cpp: At global scope:
./Main.cpp:16:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   16 | main()
      | ^~~~

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 3
AC × 16
セット名 テストケース
Sample sample00.txt, sample01.txt, sample02.txt
All sample00.txt, sample01.txt, sample02.txt, testcase00.txt, testcase01.txt, testcase02.txt, testcase03.txt, testcase04.txt, testcase05.txt, testcase06.txt, testcase07.txt, testcase08.txt, testcase09.txt, testcase10.txt, testcase11.txt, testcase12.txt
ケース名 結果 実行時間 メモリ
sample00.txt AC 1 ms 3528 KiB
sample01.txt AC 1 ms 3604 KiB
sample02.txt AC 1 ms 3464 KiB
testcase00.txt AC 1 ms 3592 KiB
testcase01.txt AC 1 ms 3484 KiB
testcase02.txt AC 1 ms 3624 KiB
testcase03.txt AC 1 ms 3592 KiB
testcase04.txt AC 1 ms 3592 KiB
testcase05.txt AC 1 ms 3592 KiB
testcase06.txt AC 1 ms 3596 KiB
testcase07.txt AC 1 ms 3568 KiB
testcase08.txt AC 1 ms 3552 KiB
testcase09.txt AC 1 ms 3464 KiB
testcase10.txt AC 1 ms 3568 KiB
testcase11.txt AC 1 ms 3484 KiB
testcase12.txt AC 1 ms 3596 KiB