提出 #61232822
ソースコード 拡げる
#include<bits/stdc++.h> #define int long long #define fi first #define se second namespace IO{ template<typename T> void read(T &x){ char ch=getchar();int fl=1;x=0; while(ch>'9'||ch<'0'){if(ch=='-')fl=-1;ch=getchar();} while(ch<='9'&&ch>='0'){x=x*10+ch-48;ch=getchar();} x*=fl; } template<typename T,typename ...Args> void read(T &x,Args& ...args){ read(x);read(args...); } template <typename _Tp> void write(_Tp x) { if(x<0) x=(~x+1),putchar('-'); if(x>9) write(x/10); putchar(x%10+'0'); } } using namespace std; using namespace IO; const int N=4e6+5,mod=998244353; vector<int> vec; signed main() { for(int i=9;i>=0;i--) { printf("%d",1); for(int j=1;j<=4;j++) printf("0"); } printf("\n"); for(int i=1;i<=90;i++) { for(int j=9;j>=0;j--) { string p=to_string(i); for(int k=0;k<p.size();k++) vec.push_back(p[k]-'0'); for(int k=1;k<=5-p.size();k++) vec.push_back(0); } vec.push_back(0); vec.push_back(0); vec.push_back(0); } cerr<<vec.size()<<endl; for(auto i:vec) printf("%d",i); return 0; } /* WWWXMMMXWWW */
提出情報
提出日時 | |
---|---|
問題 | A - Multiples in the String |
ユーザ | KAddx |
言語 | C++ 20 (gcc 12.2) |
得点 | 0 |
コード長 | 1325 Byte |
結果 | WA |
実行時間 | 1 ms |
メモリ | 3756 KiB |
コンパイルエラー
Main.cpp: In function ‘int main()’: Main.cpp:37:26: 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] 37 | for(int k=0;k<p.size();k++) | ~^~~~~~~~~ Main.cpp:39:26: 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] 39 | for(int k=1;k<=5-p.size();k++) | ~^~~~~~~~~~~~ Main.cpp:47:30: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=] 47 | for(auto i:vec) printf("%d",i); | ~^ ~ | | | | | long long int | int | %lld
ジャッジ結果
セット名 | All | ||
---|---|---|---|
得点 / 配点 | 0 / 600 | ||
結果 |
|
セット名 | テストケース |
---|---|
All | 01_testcase_00.txt |
ケース名 | 結果 | 実行時間 | メモリ |
---|---|---|---|
01_testcase_00.txt | WA | 1 ms | 3756 KiB |