結果
問題 |
No.220 世界のなんとか2
|
ユーザー |
|
提出日時 | 2017-12-31 20:43:53 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 299 bytes |
コンパイル時間 | 967 ms |
コンパイル使用メモリ | 19,968 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-21 15:33:45 |
合計ジャッジ時間 | 1,448 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:6:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d", &P); | ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> typedef unsigned long long ull; int main(void) { int P; scanf("%d", &P); P--; ull ans1 = 10; ull ans2 = 6; for (int i = 0; i < P; i++) { ans1 *= 10; ans2 *= 9; } ans1 -= ans2; ans1--; printf("%llu\n", ans1); return 0; }