結果

問題 No.220 世界のなんとか2
ユーザー 184
提出日時 2015-05-30 02:23:11
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 198 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 22,784 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-06 12:32:06
合計ジャッジ時間 678 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 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);
      |               ~~~~~^~~~~~~~~

ソースコード

diff #

#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)+ans/3);
	return 0;
}
0