結果
問題 |
No.3240 Count 8 Included Numbers (Easy)
|
ユーザー |
|
提出日時 | 2025-08-22 21:23:42 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 555 bytes |
コンパイル時間 | 3,065 ms |
コンパイル使用メモリ | 275,448 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-08-22 21:23:46 |
合計ジャッジ時間 | 3,836 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 9 WA * 7 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define int long long int #define endl "\n" signed main(){ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); int n;cin>>n; int m = n; int x = m%10; m/=10; int y = m%10; m/=10; int z = m%10; int ans = 19*z; if(y<8){ ans += y; if(x>=8)ans++; }else{ if(y==8){ ans += y; ans += x+1; }else if(y==9){ if(x<8)ans += 18; else ans += 19; } } cout<<ans<<endl; return 0; }