結果

問題 No.722 100×100=1000
ユーザー hogeover30
提出日時 2018-09-06 09:04:58
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 16 ms / 2,000 ms
コード長 170 bytes
コンパイル時間 570 ms
コンパイル使用メモリ 67,764 KB
最終ジャッジ日時 2025-01-06 12:51:36
ジャッジサーバーID
(参考情報)
judge1 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 27
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<iostream>
      |  ^~~~~~
main.cpp:3:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
    3 | main(){long a,b,t,m=1e8;std::cin>>a>>b;t=F(a)|F(b);a*=b;printf(t&&a/m?"E":"%lld",t?a:a/10);}
      | ^~~~
main.cpp: In function ‘int main()’:
main.cpp:3:79: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘long int’ [-Wformat=]
    3 | main(){long a,b,t,m=1e8;std::cin>>a>>b;t=F(a)|F(b);a*=b;printf(t&&a/m?"E":"%lld",t?a:a/10);}
      |                                                                            ~~~^  ~~~~~~~~
      |                                                                               |   |
      |                                                                               |   long int
      |                                                                               long long int
      |                                                                            %ld

ソースコード

diff #

#import<iostream>
#define F(a)({for(t=abs(a);t&&t%10<1;t/=10);!t|t>9|a%100;})
main(){long a,b,t,m=1e8;std::cin>>a>>b;t=F(a)|F(b);a*=b;printf(t&&a/m?"E":"%lld",t?a:a/10);}
0