結果
| 問題 |
No.220 世界のなんとか2
|
| コンテスト | |
| ユーザー |
184
|
| 提出日時 | 2015-05-30 02:24:14 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 200 bytes |
| コンパイル時間 | 114 ms |
| コンパイル使用メモリ | 22,656 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-06 12:32:09 |
| 合計ジャッジ時間 | 719 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:20: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | int p;scanf("%d",&p);long long ans=1,tmp=1;
| ~~~~~^~~~~~~~~
ソースコード
#include <cstdio>
using namespace std;
//namaega184
int main(){
int p;scanf("%d",&p);long long ans=1,tmp=1;
for(int i=0;i<p;i++)tmp*=10,ans*=9;
printf("%lld\n",(tmp-ans)-1LL+ans/3);
return 0;
}
184